Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 3351 by ondrej.c...@gmail.com: KeyError: 0 in plotting
http://code.google.com/p/sympy/issues/detail?id=3351
In [1]: from sympy import *
In [3]: p=Plot(visible=False)
In [5]: var("x")
Out[5]: x
In [6]: f=x**2
In [7]: p[1]=x**2
In [8]: p[2]=f.diff(x)
In [9]: p[3]=f.diff(x).diff(x)
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-9-c68bba1fc923> in <module>()
----> 1 p[3]=f.diff(x).diff(x)
/home/ondrej/repos/qsnake/local/lib/python2.6/site-packages/sympy/plotting/pygletplot/plot.pyc
in
__setitem__(self, i, args)
299 return # no arguments given
300 kwargs = dict(bounds_callback=self.adjust_all_bounds)
--> 301 f = PlotMode(*args, **kwargs)
302
303 if f:
/home/ondrej/repos/qsnake/local/lib/python2.6/site-packages/sympy/plotting/pygletplot/plot_mode.pyc
in
__new__(cls, *args, **kwargs)
73
74 # Find the appropriate mode
---> 75 subcls = PlotMode._get_mode(mode_arg, i, d)
76
77 # Create the object
/home/ondrej/repos/qsnake/local/lib/python2.6/site-packages/sympy/plotting/pygletplot/plot_mode.pyc
in
_get_mode(mode_arg, i_var_count, d_var_count)
151 # default mode
152 if not mode_arg:
--> 153 return PlotMode._get_default_mode(i, d)
154 # Otherwise, interpret the string as a mode
155 # alias (e.g. 'cartesian', 'parametric', etc)
/home/ondrej/repos/qsnake/local/lib/python2.6/site-packages/sympy/plotting/pygletplot/plot_mode.pyc
in
_get_default_mode(i, d, i_vars)
165 i_vars = i
166 try:
--> 167 return PlotMode._mode_default_map[d][i]
168 except TypeError:
169 # Keep looking for modes in higher i var counts
KeyError: 0
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.