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
|