David Joyner wrote:
> I don't know if this is helpful or not but here is what I get
> (ubuntu 8.04, sage-3.3.alpha1):
>
>
> sage: import pylab
> sage: pylab.clf()
> sage: pylab.figure(1)
> <matplotlib.figure.Figure object at 0x69e9150>
> sage: xs = range(1,10000,100)
> sage: pylab.plot(xs, bits24_original, label="$S_n$")
> ---------------------------------------------------------------------------
> NameError Traceback (most recent call last)
>
> /home/wdj/.sage/temp/tinah/11106/_home_wdj_teaching_sm212_grades_record_sage_25.py
> in <module>()
> ----> 1
> 2
> 3
> 4
> 5
>
> NameError: name 'bits24_original' is not defined
What is bits24_original? I don't see it defined above.
I think this error is causing the warnings below.
Jason
> sage: pylab.legend(loc=2)
> /home/wdj/sagefiles/sage-3.3.alpha1/local/lib/python2.5/site-packages/matplotlib/axes.py:3590:
> UserWarning: No labeled objects found. Use label='...' kwarg on
> individual plots.
> warnings.warn("No labeled objects found. Use label='...' kwarg on
> individual plots.")
> sage: pylab.ylabel("iterations")
> <matplotlib.text.Text object at 0x6dd7d90>
> sage: pylab.xlabel("x")
> <matplotlib.text.Text object at 0x6ddaa90>
> sage: pylab.grid(b=True)
> sage: pylab.savefig('/home/wdj/sagefiles/graph.svg',dpi=1000)
>
> It saves a graph with labeled axes but no plot. I don't understand the error
> messages (either for your code or for mine) produced though.
>
>
>
> On Thu, Feb 19, 2009 at 6:46 PM, M. Yurko <[email protected]> wrote:
>> First off, I know that this is specificaly a SAGE issue, but I can't
>> find a matplotlib list, so I'm hoping that someone here can help. I
>> recieve an error when executing the following code in the notebook:
>>
>> #Create the graph
>> import pylab
>> pylab.clf()
>> pylab.figure(1)
>> pylab.plot(xs, bits24_original, label="$S_n$")
>> pylab.legend(loc=2)
>> pylab.ylabel("iterations")
>> pylab.xlabel("x")
>> pylab.grid(b=True)
>> pylab.savefig('graph.svg',dpi=1000)
>>
>> and I get
>>
>> traceback (most recent call last): pylab.plot(xs, bits24_original,
>> label="$S_n$") #plot the data
>> File "/home/myurko/Desktop/sage/local/lib/python2.5/site-packages/
>> matplotlib/pyplot.py", line 333, in clf
>> gcf().clf()
>> File "/home/myurko/Desktop/sage/local/lib/python2.5/site-packages/
>> matplotlib/figure.py", line 693, in clf
>> ax.cla()
>> File "/home/myurko/Desktop/sage/local/lib/python2.5/site-packages/
>> matplotlib/axes.py", line 827, in cla
>> self.set_xscale('linear')
>> File "/home/myurko/Desktop/sage/local/lib/python2.5/site-packages/
>> matplotlib/axes.py", line 1817, in set_xscale
>> self.autoscale_view()
>> File "/home/myurko/Desktop/sage/local/lib/python2.5/site-packages/
>> matplotlib/axes.py", line 1437, in autoscale_view
>> YL = self.yaxis.get_major_locator().autoscale()
>> File "/home/myurko/Desktop/sage/local/lib/python2.5/site-packages/
>> matplotlib/ticker.py", line 945, in autoscale
>> return np.take(self.bin_boundaries(dmin, dmax), [0,-1])
>> File "/home/myurko/Desktop/sage/local/lib/python2.5/site-packages/
>> matplotlib/ticker.py", line 911, in bin_boundaries
>> scale, offset = scale_range(vmin, vmax, nbins)
>> File "/home/myurko/Desktop/sage/local/lib/python2.5/site-packages/
>> matplotlib/ticker.py", line 875, in scale_range
>> ex = divmod(math.log10(meanv), 1)[0]
>> OverflowError: math range error
>>
>> A quick google serach yielded on person who had the same issue in
>> 2006, but there was no response. Also, this same code executed just a
>> few days ago without errors. Any help would be appreciated.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---