<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def varexp(line):
 """ Spyder's variable explorer magic Used to generate plots, histograms and images of the variables displayed on it. """

    ip = get_ipython()       #analysis:ignore
    funcname, name = line.split()
    try:
        import guiqwt.pyplot as pyplot
    except:
        import matplotlib.pyplot as pyplot
    __fig__ = pyplot.figure();
    __items__ = getattr(pyplot, funcname[2:])(ip.user_ns[name])
    pyplot.show()
    del __fig__, __items__