Em Dom, 2008-11-16 às 11:44 -0800, William Stein escreveu:
> > Additionally, I think the Graphics wrapper should not be nearly as
> > heavy as it is.  In particular, there's no way to get at and modify
> > the matplotlib subplot object.  For example, I have some preliminary
> > code that would let one do this:
> >
> > sage: p = plot(e^x, 1, 5)
> > sage: p.subplot.set_xlabel('Mike')
> > <matplotlib.text.Text object at 0x46b8350>
> > sage: p.subplot.set_title('A plot')
> > <matplotlib.text.Text object at 0x46badd0>
> > sage: p.subplot.set_ylabel("Sage")
> > <matplotlib.text.Text object at 0x46ba090>
> > sage: p.save('plot1.png')
> > sage: p.subplot.set_yscale('log')
> > sage: p.save('plot2.png')
> >
> > to produce the following images:
> >
> > http://sage.math.washington.edu/home/mhansen/plot1.png
> > http://sage.math.washington.edu/home/mhansen/plot2.png
> >
> > While this would mean being more closely tied to matplotlib as a
> > backed, I think the benefits are worth it.  I don't envision anybody
> > working on another backend for Graphics anytime in the near future.
+1 for being more tied to matplotlib.
I have advocated a lot for this to go through, since matplotlib has a
pretty complete documentation and its site was recently revamped to
include a lot of really good examples (generated at realtime).
Getting closer to matplotlib mean making it easier to use it's
functionalities by default, producing the examples provided in its site
with less workarounds.
> 
> What about x and y axis?  None of your examples above have x/y axis --
> instead they have frames.  Most of the code your suggesting deleting
> is about drawing x/y axis, but none of your examples have them, and I
> don't know how to draw them using matplotlib.   Maybe there is some
> easy way to do this by repositioning the axis?

Most other math packages out there (or at least Mma and Matlab) use
frames instead of just axes. What I would recommend instead of using
axes is to use correctly placed grids, which is done with grids(True)
and one can also customize grid placement with xticks() and yticks(),
though I don't know if those functions are exposed by sage.

> 
> It is fine in my opinion to tie axes more closely to matplotlib,
> insofar as matplotlib actually has the functionality.
> 
> William

Ronan


--~--~---------~--~----~------------~-------~--~----~
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