#4885: fix fallout from sloppy review of 4535
----------------------+-----------------------------------------------------
Reporter: was | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-3.2.3
Component: graphics | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Comment (by was):
I'm doctesting the old plot.py and finding what was broke by the
refactoring.
1. Lots of xmin/xmax, etc. That's known.
2. The API of text changed:
{{{
sage: text("Sage is really neat!!",(2,12,1))
Exception raised:
Traceback (most recent call last):
File "/home/wstein/build/sage-3.2.3.alpha0/local/lib/python2.5/site-
packages/sage/plot/text.py", line 79, in text
def text(string, (x,y), **options):
ValueError: too many values to unpack
}}}
Instead of ValueError, it might be better to be
{{{
ValueError: too many values to unpack (try using text3d)
}}}
at least when 3 coordinates are given. This will help with people
transition code that uses the old text command.
This example used to work fine before the refactoring, but #4535 broke it:
{{{
E = EllipticCurve('37a')
P = E(0,0)
def get_points(n): return sum([point(i*P, pointsize=3) for i in
range(-n,n) if i != 0 and (i*P)[0] < 3])
sum([get_points(15*n).plot3d(z=n) for n in range(1,10)])
}}}
it fails with this error:
{{{
self.loc = (float(center[0]), float(center[1]), float(center[2]))
File "rational.pyx", line 1112, in
sage.rings.rational.Rational.__getitem__ (sage/rings/rational.c:8532)
IndexError: index n (=1) out of range; it must be 0
}}}
Everything else is harmless as far as I can tell.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4885#comment:6>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---