def plot(self, name, funcname):
    command = ("import spyderlib.pyplot; __fig__ = spyderlib.pyplot.figure(); __items__ = getattr(spyderlib.pyplot, '%s')(%s); spyderlib.pyplot.show(); del __fig__, __items__;" % (funcname, name))
    if self.is_ipykernel:
        self.ipyclient.shellwidget.execute(('%%varexp --%s %s' % (funcname, name)))
    else:
        self.shellwidget.send_to_process(command)
def plot(self, name, funcname):
    command = ("import spyderlib.pyplot; __fig__ = spyderlib.pyplot.figure(); __items__ = getattr(spyderlib.pyplot, '%s')(%s); spyderlib.pyplot.show(); del __fig__, __items__;" % (funcname, name))
    if self.is_ipykernel:
        self.ipyclient.shellwidget.execute(('%%varexp --%s %s' % (funcname, name)))
    else:
        self.shellwidget.send_to_process(command)