Hi folks,
I finished coding a few changes to foo.show to make it easy to display
plots for use in papers etc without having to directly interact with
matplotlib.  Specifically, for regular plots, (I haven't tried this
with contour plots but it should play well with minor additions), I've
added an bool option to foo.show() called labels_on_frame.  If this is
set to true along with frame=true, the y-axis label is displayed
vertically outside the frame, on the left hand side, and the x-axis
label is displayed along the bottom.  I also made it so that the frame
axes aren't padded to add at least 10% edge space so that in this case
plots actually start as stated by xmin and ymin.

for instance:

ex=plot(sin)
ex.show(frame=true,axes=false,labels_on_frame=true,axes_labels=['x','y'])

shows a graph where the frame is bounded -1,-1 to 1,1, with labels in
the right place.

I need to add some documentation still, and the positioning of the
labels is a bit hackish.  Also this currently only works in the
notebook, the command-line session bugs out for a reason I haven't
tracked down yet. Is there interest in this? I also don't know how or
where to upload the code to be viewed, but it's only some minor
changes in plot.py and Axes.py . I'm frantically trying to scrape
together a talk, but I can upload a first go sometime today if people
want.

I was also considering changing the toggle to something like
display_pretty and have it by default turn axes off and frame to true,
as this is the natural way I think of seeing plots.

Regards,
Thomas

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

Reply via email to