The correct code:

p = pylab.plot(t,y)

Thank you!




On Fri, Aug 7, 2009 at 5:01 PM, Rafael Cardoso Dias Costa
<rfc...@gmail.com>wrote:

> People,
>
> Help me, please.
>
> *My code is:*
>
> reset()
>
> import pylab as pylab
>
> T = 0.1
> t = pylab.linspace(0,100-T,100/T)
> y = pylab.sin(2*pi*0.2*t)
>
> p = pylab.plot(x,y)
>
> pylab.savefig('teste.png')
> *
>
>
> The error is:*
>
>
> Traceback (click to the left for traceback)
> ...
> TypeError: 'sage.symbolic.expression.Expression' object is not iterable
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>
>   File "/home/sage/sagenb/sage_notebook/worksheets/rfcard/0/code/26.py", line 
> 15, in <module>
>     p = pylab.plot(x,y)
>   File 
> "/home/sage/sage_install/sage/local/lib/python2.6/site-packages/matplotlib/pyplot.py",
>  line 2118, in plot
>
>     ret =  gca().plot(*args, **kwargs)
>   File 
> "/home/sage/sage_install/sage/local/lib/python2.6/site-packages/matplotlib/axes.py",
>  line 3348, in plot
>     for line in self._get_lines(*args, **kwargs):
>   File 
> "/home/sage/sage_install/sage/local/lib/python2.6/site-packages/matplotlib/axes.py",
>  line 397, in _grab_next_args
>
>     for seg in self._plot_2_args(remaining, **kwargs):
>   File 
> "/home/sage/sage_install/sage/local/lib/python2.6/site-packages/matplotlib/axes.py",
>  line 301, in _plot_2_args
>     x, y, multicol = self._xy_from_xy(x, y)
>
>   File 
> "/home/sage/sage_install/sage/local/lib/python2.6/site-packages/matplotlib/axes.py",
>  line 217, in _xy_from_xy
>     bx = self.axes.xaxis.update_units(x)
>   File 
> "/home/sage/sage_install/sage/local/lib/python2.6/site-packages/matplotlib/axis.py",
>  line 969, in update_units
>
>     converter = munits.registry.get_converter(data)
>   File 
> "/home/sage/sage_install/sage/local/lib/python2.6/site-packages/matplotlib/units.py",
>  line 138, in get_converter
>     for thisx in x:
> TypeError: 'sage.symbolic.expression.Expression' object is not iterable
>
>
> Thank you!
>
>
> --
> Rafael Costa
>



-- 
Rafael Cardoso Dias Costa
Engenheiro de Controle e Automação - UFMG
Mestrando em Engenharia Química - Controle de Processos - UFRGS
+55 51 8541-0926 :: Porto Alegre - RS
+55 51 8430-1421 :: Porto Alegre - RS
+55 31 9165-5488 :: Belo Horizonte - MG
+55 31 3466-0146 :: Residência em Belo Horizonte - MG

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

Reply via email to