-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Great discussion.
I think this tangent indicates a need for a section to explain both the history of pylab, matplotlib.pyplot, and how they relate. (I'm still confused at what exactly the difference is.) My perspective is that of a scientist doing numerical analysis who needs to visualize computational results and compare it to experimental data. I normally don't have time to get into the interesting computer science essoterica: what I need are - a toolkit of HOWTOs; - a solid reference to the various classes and functions; and - a comprehensive index. I also echo the request for a consistency in style: e.g., always use the OO style as a basis, *supplementing* (i.e., duplicating) with a MATLAB-style as needed. When doing dev and programming work in python, I find myself constantly refering to Martelli's "Python in a Nutshell" (2nd ed., but often using the index from the 1st ed. because it's soooooo much better). At times I also find Martelli & Ascher's "Python Cookbook" invaluable. I think that a good reference to functions with liberal use of code snippets, combined with a chapter of short cookbook examples, would be most useful for the Matplotlib book. Tell the gent who floated you the proposal that I'm looking forward to purchasing the book. Oh, and please hurry up with the publication! :-) James On Monday 05 January 2009 17:48:43 Christopher Barker wrote: > Sandro Tosi wrote: > > So you suggest to start from matplotlib.pyplot and not from pylab? > > actually, I think matpoltlib.pyplot still has all of pylab in it, just > not all of numpy also. So yes, do that, but what I meant was to focus on > using the OO interface, rather than the state machine interface: > > rather than 'gca', 'gcf', etc, store references to the figures and axis, > etc: > > this kind of thing: > > fig = plt.Figure() > > ax = fig.add_subplot(111) > ax.plot([1,2,3]) > > ax.set_title('hi mom') > > ax.grid(True) > > ax.set_xlabel('time') > ax.set_ylabel('volts') > > While we are at it, discourage the use of "import *" ! > > -Chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFJZMs1xOXthSHeGJIRAjFeAKC5vxJUaUfS+ePtyW2/ehBfL/GtRQCfVI63 WNT4U8fOaaLL5ijsi4JTz3g= =SpGy -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users