On Fri, Nov 19, 2010 at 9:10 AM, Kynn Jones <kyn...@gmail.com> wrote: > > > When I read your message about implementing the non-GUI mode, it turns this > simple picture completely on its head, which tells me that matplotlib's > architecture is, at this point, beyond my comprehension. One of the reasons > for looking forward to your implementation of the non-GUI mode for the MacOSX > backend is that, by studying a diff between this enhanced version and the > previous version I may be able to finally understand matplotlib's basic > architecture. >
>From the introduction: http://matplotlib.sourceforge.net/users/intro.html:: The matplotlib code is conceptually divided into three parts: the pylab interface is the set of functions provided by matplotlib.pylab which allow the user to create plots with code quite similar to MATLAB figure generating code (Pyplot tutorial). The matplotlib frontend or matplotlib API is the set of classes that do the heavy lifting, creating and managing figures, text, lines, plots and so on (Artist tutorial). This is an abstract interface that knows nothing about output. The backends are device dependent drawing devices, aka renderers, that transform the frontend representation to hardcopy or a display device (What is a backend?). Example backends: PS creates PostScript? hardcopy, SVG creates Scalable Vector Graphics hardcopy, Agg creates PNG output using the high quality Anti-Grain Geometry library that ships with matplotlib, GTK embeds matplotlib in a Gtk+ application, GTKAgg uses the Anti-Grain renderer to create a figure and embed it a Gtk+ application, and so on for PDF, WxWidgets, Tkinter etc. matplotlib is used by many people in many different contexts. Some people want to automatically generate PostScript files to send to a printer or publishers. Others deploy matplotlib on a web application server to generate PNG output for inclusion in dynamically-generated web pages. Some use matplotlib interactively from the Python shell in Tkinter on Windows?. My primary use is to embed matplotlib in a Gtk+ EEG application that runs on Windows, Linux and Macintosh OS X. Elaborating a little bit: the middle part of matplotlib, the artist hierarchy, is what I think you are looking for. That is where abstractions like Line2D, Circle and Text live. There is no concept of a GUI or a render at that abstraction. http://matplotlib.sourceforge.net/users/artists.html#artist-tutorial ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel