## matplotlib-users

 [Matplotlib-users] invisible plot From: Dr. Phillip M. Feldman - 2009-07-15 21:58:15 ```I'm a newbie to matplotlib. When I try to generate a simple plot, nothing happens. Any advice will be appreciated. Here's my code: from numpy import * from matplotlib import * x= arange(0,10.,0.1) y= x**1.5 - 0.25*x**2 pyplot.figure(figsize=(9, 6), dpi=120) pyplot.plot(x, y) -- View this message in context: http://www.nabble.com/invisible-plot-tp24506682p24506682.html Sent from the matplotlib - users mailing list archive at Nabble.com. ```
 Re: [Matplotlib-users] invisible plot From: Robert Kern - 2009-07-15 22:03:39 ```On 2009-07-15 16:58, Dr. Phillip M. Feldman wrote: > I'm a newbie to matplotlib. When I try to generate a simple plot, nothing > happens. Any advice will be appreciated. Here's my code: > > from numpy import * > from matplotlib import * > > x= arange(0,10.,0.1) > y= x**1.5 - 0.25*x**2 > > pyplot.figure(figsize=(9, 6), dpi=120) > pyplot.plot(x, y) pyplot.show() -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco ```
 Re: [Matplotlib-users] invisible plot From: Ryan May - 2009-07-15 22:04:20 Attachments: Message as HTML ```On Wed, Jul 15, 2009 at 4:58 PM, Dr. Phillip M. Feldman < pfeldman@...> wrote: > > I'm a newbie to matplotlib. When I try to generate a simple plot, nothing > happens. Any advice will be appreciated. Here's my code: > > from numpy import * > from matplotlib import * > > x= arange(0,10.,0.1) > y= x**1.5 - 0.25*x**2 > > pyplot.figure(figsize=(9, 6), dpi=120) > pyplot.plot(x, y) Add this to the end of the script (after all the plotting): pyplot.show() Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma ```
 Re: [Matplotlib-users] invisible plot From: Eric Firing - 2009-07-15 22:05:20 ```Dr. Phillip M. Feldman wrote: > I'm a newbie to matplotlib. When I try to generate a simple plot, nothing > happens. Any advice will be appreciated. Here's my code: > > from numpy import * > from matplotlib import * > > x= arange(0,10.,0.1) > y= x**1.5 - 0.25*x**2 > > pyplot.figure(figsize=(9, 6), dpi=120) > pyplot.plot(x, y) pyplot.show() Or run inside "ipython -pylab". Eric ```
 Re: [Matplotlib-users] invisible plot From: Alan G Isaac - 2009-07-15 22:08:07 ```On 7/15/2009 5:58 PM Dr. Phillip M. Feldman apparently wrote: > I'm a newbie to matplotlib. When I try to generate a simple plot, nothing > happens. Any advice will be appreciated. Here's my code: > from numpy import * > from matplotlib import * > x= arange(0,10.,0.1) > y= x**1.5 - 0.25*x**2 > pyplot.figure(figsize=(9, 6), dpi=120) > pyplot.plot(x, y) Hmm, I don't think you copied that quite right. Anyway:: import numpy as np from matplotlib import pyplot as plt x= np.arange(0,10.,0.1) y= x**1.5 - 0.25*x**2 fig = plt.figure(figsize=(9, 6), dpi=120) myplot = plt.plot(x, y) plt.show() Alan Isaac ```
 Re: [Matplotlib-users] invisible plot From: Damon McDougall - 2009-07-15 22:08:13 ```Hi Phillip, Don't you need to call pyplot.show() at the end of the script? Regards, --Damon On 15 Jul 2009, at 22:58, Dr. Phillip M. Feldman wrote: > > I'm a newbie to matplotlib. When I try to generate a simple plot, > nothing > happens. Any advice will be appreciated. Here's my code: > > from numpy import * > from matplotlib import * > > x= arange(0,10.,0.1) > y= x**1.5 - 0.25*x**2 > > pyplot.figure(figsize=(9, 6), dpi=120) > pyplot.plot(x, y) > -- > View this message in context: http://www.nabble.com/invisible-plot-tp24506682p24506682.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to \$100,000 in prizes! For a limited > time, > vendors submitting new applications to BlackBerry App World(TM) will > have > the opportunity to enter the BlackBerry Developer Challenge. See > full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ```