On Wed, Jun 11, 2008 at 5:29 AM, tkeller <[EMAIL PROTECTED]> wrote: > > 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?
Yes, definitely. > 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. When you're done, just post it here. Once you get a tiny bit more experience you can get a trac account (http://trac.sagemath.org/sage_trac) from Michael Abshoff ([EMAIL PROTECTED]) and post patches for review there. > 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. That sounds possibly biased. I.e., it suggests the default is ugly, and the pretty display is only the one you happen to like :-). I could see just making labels_on_frame=true the default for frame=True though. -- William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---