#16226: Tachyon plot produces invalid file
-------------------------------------+-------------------------------------
Reporter: niles | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.2
Component: graphics | Resolution:
Keywords: tachyon, plot3d | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/niles/16226/quick-n-dirty | 3700e0d6af5515c309fef5d5d5f09f16ef7fba7e
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by niles):
Replying to [comment:3 kcrisman]:
> Don't worry about coordination on this ticket. Is this ready for
review?
Unfortunately I don't think so. First, it needs some doctests to have
100% coverage. Second, I think we need some better doctests for
`Tachyon.plot` and other functions, so that regressions like this are less
likely in the future. Like maybe printing out a small portion of the
tachyon string (what portion?), or its md5 hash (too fragile?), or
checking the file size of the rendered image (too slow?).
Lastly, I'm not sure we really want to commit to `__str__` being the same
as `.str()`. Another easy fix which doesn't force this would be to change
the `.str()` method of `TrianglePlot` from using
{{{
[str(o) for o in self._objects]
}}}
to
{{{
[o.str() for o in self._objects]
}}}
and add a `.str()` method for the default `Triangle` and `SmoothTriangle`
classes. Since `TrianglePlot` isn't used in the rest of Sage, this
probably wouldn't cause too much trouble.
Moreover, this would be more consistent with what's done for all the other
Tachyon types, and would avoid mixing up what `.str()` means for Tachyon
stuff---`.str()` is the exact code to be processed---with what `__str__`
means for Python stuff---`__str__` returns a user-readable string
describing the object, but need not be as exact as `__repr__`. Or maybe
this mixup is inevitable and we might as well embrace it, even though it's
confusing.
--
Ticket URL: <http://trac.sagemath.org/ticket/16226#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.