Here are two potential fixes for the rc0 update problem you have:

system:sage
system:sage

{{{id=3|
import matplotlib.pyplot as pyplot
///
}}}

{{{id=0|
RealNumber=float; Integer=int
A=3202.6427147395325
B=2.7068484110275158e-05

fit(x)= A + B * x
Xfit=[0, 800000000]
Yfit=[float(fit(0)), float(fit(800000000))]
///
}}}

{{{id=1|
P2=pyplot.plot(Xfit, Yfit, 'b')
///
}}}

{{{id=5|
RealNumber=float; Integer=int
A=3202.6427147395325
B=2.7068484110275158e-05

fit = lambda x: A + B * x
Xfit=[0, 800000000]
Yfit=[fit(0), fit(800000000)]
///
}}}

{{{id=6|
P2=pyplot.plot(Xfit, Yfit, 'b')
///
}}}

{{{id=7|

///
}}}

2009/5/21 Kevin Horton <khorto...@rogers.com>:
>
> On 21 May 2009, at 10:14, mabshoff wrote:
>>
>>
>> I gotta run to the airport, but sources and upgrade bits of 4.0.rc0
>> are in
>>
>>   http://sage.math.washington.edu/home/mabshoff/release-cycles-4.0/
>> rc0/
>
>
> A worksheet that worked fine under sage 3.4.2 and 4.0.alpha0 fails
> under 4.0rc0.  The whole sheet can be seen at sagenb.org:
>
> http://sagenb.org/home/pub/541
>
> A relevant minimal example is:
>
> {{{id=3|
> import matplotlib.pyplot as pyplot
> ///
> }}}
>
> {{{id=0|
> RealNumber=float; Integer=int
> A=3202.6427147395325
> B=2.7068484110275158e-05
>
> fit(x)= A + B * x
> Xfit=[0, 800000000]
> Yfit=[fit(0), fit(800000000)]
> ///
> }}}
>
> {{{id=1|
> P2=pyplot.plot(Xfit, Yfit, 'b')
> ///
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/home/kwh/.sage/sage_notebook/worksheets/KevinHorton/22/code/
> 14.py", line 6, in <module>
>     exec compile(ur'P2=pyplot.plot(Xfit, Yfit, \u0027b\u0027)' +
> '\n', '', 'single')
>   File "/opt/sage-4.0.rc0/local/lib/python2.5/site-packages/Jinja-1.2-
> py2.5-linux-i686.egg/", line 1, in <module>
>
>   File "/opt/sage-4.0.rc0/local/lib/python2.5/site-packages/
> matplotlib/pyplot.py", line 2118, in plot
>     ret =  gca().plot(*args, **kwargs)
>   File "/opt/sage-4.0.rc0/local/lib/python2.5/site-packages/
> matplotlib/axes.py", line 3348, in plot
>     for line in self._get_lines(*args, **kwargs):
>   File "/opt/sage-4.0.rc0/local/lib/python2.5/site-packages/
> matplotlib/axes.py", line 404, in _grab_next_args
>     for seg in self._plot_3_args(remaining, **kwargs):
>   File "/opt/sage-4.0.rc0/local/lib/python2.5/site-packages/
> matplotlib/axes.py", line 343, in _plot_3_args
>     x, y, multicol = self._xy_from_xy(x, y)
>   File "/opt/sage-4.0.rc0/local/lib/python2.5/site-packages/
> matplotlib/axes.py", line 218, in _xy_from_xy
>     by = self.axes.yaxis.update_units(y)
>   File "/opt/sage-4.0.rc0/local/lib/python2.5/site-packages/
> matplotlib/axis.py", line 969, in update_units
>     converter = munits.registry.get_converter(data)
>   File "/opt/sage-4.0.rc0/local/lib/python2.5/site-packages/
> matplotlib/units.py", line 139, in get_converter
>     converter = self.get_converter( thisx )
>   File "/opt/sage-4.0.rc0/local/lib/python2.5/site-packages/
> matplotlib/units.py", line 138, in get_converter
>     for thisx in x:
> TypeError: 'sage.symbolic.expression.Expression' object is not iterable
> }}}
>
> Is this an expected result due to a change in sage-4.0.rc0?  If so,
> I'd appreciate any hints on how I need to modify my code.
>
> My server is running on ubuntu 8.10.
>
> --
> Kevin Horton
> Ottawa, Canada
>
>
>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to