def magic_gp_set_default(self,parameter_s=''):

    gname = parameter_s.strip()
    G = eval(gname,self.shell.user_ns)
    self.shell.gnuplot = G
    self.shell.user_ns.update({'plot':G.plot,'splot':G.splot,'plot2':G.plot2,
                               'replot':G.replot,'hardcopy':G.hardcopy})
Set the default gnuplot instance accessed by the %gp magic function.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/deathrow/GnuplotInteractive.py/magic_gp_set_default