On Dec 27, 2007 12:45 AM, William Stein <[EMAIL PROTECTED]> wrote: > On Dec 26, 2007 10:19 PM, David Joyner <[EMAIL PROTECTED]> wrote:
> > > I'm thinking of adding matplotlib and jmol to the history and completely > > rewriting the graphics section. Thoughts? > > Yes, please do. Definitely add how to use pylab as well, i.e., do > sage: import pylab > sage: pylab.[tab key] > to get Matlab-like graphics. Make sure people realize the issues > with Sage types versus floats, etc. I cannot get one example of pylab from http://matplotlib.sourceforge.net/screenshots.html to work on the sage command line (including the first one, which is I think included in the sage ref manual). However, from the python command line, the pie chart example works great: from pylab import * # make a square figure and axes figure(1, figsize=(8,8)) ax = axes([0.1, 0.1, 0.8, 0.8]) labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' fracs = [15,30,45, 10] figure(1) pie(fracs, labels=labels) # figure(2) showa some optional features. autopct is used to label # the percentage of the pie, and can be a format string or a function # which takes a percentage and returns a string. explode is a # len(fracs) sequuence which gives the fraction of the radius to # offset that slice. figure(2, figsize=(8,8)) explode=(0, 0.05, 0, 0) pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True) savefig('/home/wdj/pie_demo') Do you see what I'm doing wrong here? --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@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-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---