#4342: [with patch; needs review] Add legends to plot.py
-------------------------+--------------------------------------------------
Reporter: anakha | Owner: anakha
Type: enhancement | Status: assigned
Priority: major | Milestone: sage-3.4
Component: graphics | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by abergeron):
* summary: [with patch; needs work] Add legends to plot.py => [with
patch; needs review] Add legends to plot.py
Comment:
The last patch (trac_4342_v3.2.patch) fixes the TypeError problem and add
tests and documentation where appropriate (can't believe I missed these).
As far as I know, there is no way to get the function that's being plotted
from the GraphicsPrimitve object (except maybe for some specialized
primitives like Circle) because all you have is a matrix of sample points.
So I don't think it is a good way.
About the center point, it is already possible to specify a tuple of
floats between 0 and 1 that gives the relative coordinates of the legend
box.
And last, about the design, I kind of copied it from matplotlib where each
object is labeled beforehand. I could always provide an option to specify
legend labels in show() and save() but due to the design of Graphics I
think this would be shaky at best because the user has now reliable way of
knowing the content of a Graphics object.
Anyway if some clever way of overcoming the obstacle(s) above is found
then something like what you want could be implemented in a later patch.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4342#comment:9>
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
-~----------~----~----~----~------~----~------~--~---