[SciPy-user] recursion limit in plot

Ryan May rmay31@gmail....
Thu Jan 15 09:51:47 CST 2009


Neal Becker wrote:
> What's wrong here?
> This code snippet:
> 
> from pylab import plot, show
> print Id
> print pout
> 
> plot (Id, pout)
> show()
> 
> produces:
> ['50', '100', '150', '200', '250', '300', '350', '400', '450', '500', '550', 
> '600', '650', '700', '750', '800', '850', '900', '950', '1000', '1050']
> ['0', '7.4', '11.4', '14.2', '16.3', '18.1', '19.3', '20.6', '21.6', '22.6', 
> '23.4', '24.1', '24.9', '25.4', '26.1', '26.5', '26.9', '27.1', '27.3', 
> '27.4', '27.4']

The problem here is that you're trying to plot lists of strings instead of lists
of numbers.  You need to convert all of these values to numbers.  However,
matplotlib could behave a bit more nicely in this case rather than simply
recursing until it hits the limit.

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma


More information about the SciPy-user mailing list