Feature request: nice grouping in postscript output

John, the PS backend is great -- just used it in a paper

    > -- but after Nathan's post I'm wondering about effort
    > duplication. I looked over the examples on the PyX
    > website (pyx.sourceforge.net): they _are_ impressive.

I didn't see any post by Nathan on this subject. But my email has
been a little flaky over the last month -- could you forward it to me?

    > I don't want to offend, but I'm wondering if we could use
    > PyX for the postscript backend, or otherwise merge? Two
    > great tastes and all...

Wow, pyx looks great. I didn't even know it existed; I'm not sure how
I missed it. pyx has an advantage over matplotlib because it is
designed around postscript, which as you know is an extremely powerful
drawing program. It is, however, difficult to implement as an
abstract renderer, eg, to set up an interface that takes advantage of
postscript's power while still being able to render to a GTK drawing
area.

That said, I think your suggestion is a good one, to have a pyx
backend where matplotlib draws to a pyx canvas and then the user can
have access to that canvas to add things like latex markup, fancy
stuff that matplotlib can't do, etc.... I haven't had time to dive
into pyx yet, but it is certainly seems suitable for something like
that. Had I seen pyx before starting on the PS backend, I certainly
would have used it.

That said, I don't regret doing it myself since 1) it gave me the
chance to learn some postscript and 2) now matplotlib can generate PS
with the only dependence being Numeric. pyx has some C code in it,
which makes it more difficult for win32 users since they have to have
the extension compiled for their particular python version. I wrote
an EEG and CT analysis application which must run on linux and win32
that depends on around 10-15 other packages, and it is a pain to get
all packages for a given version of python. I've spent long hours
trying to compile them myself if a win installer is not available.
But I suspect most people wanting postscript/tex are on a linux/unix
platform.

Thanks for the suggestion,
John Hunter

John,

Looking at pyx was Nathan's main point. He also included a very short
program that showed how to preview PyX output in Python:

import pygtk; pygtk.require("2.0")
import sys
import gtk

import bonobo
import bonobo.ui
                                                                                
win = gtk.Window()
win.connect("delete-event", gtk.mainquit)
win.show()
                                                                                
container = bonobo.ui.Container()
control = bonobo.ui.Widget("file://home/ctwardy/Library/mcallister.pdf",
                           container.corba_objref())
# A control widget is just like any other GtkWidget.
control.show()
win.add(control)
                                                                                
gtk.main()
                                                                                
}Wow, pyx looks great. I didn't even know it existed; I'm not sure how
I didn't know either.
}
}That said, I don't regret doing it myself since...
Absolutely.

···

--
Charles R. Twardy, Res.Fellow, Monash University, School of CSSE
ctwardy at alumni indiana edu +61(3) 9905 5823 (w) 5146 (fax)

"Incongruous places often inspire anomalous stories." -- S.J. Gould

Wow, pyx looks great. I didn't even know it existed; I'm not sure how

While we're pointing to potential backends, may I suggest (for the distant future) that VTK be used as a backend once matplotlib goes 3D? I've been using (the Python bindings for) it for a while now and think it blows everything else out of the water. A matplotlib bridge to it would be awesome as a simple interface, and data could be automatically saved in a .vtk format, making arbitrarily sophisticated things possible. (Mayavi being a good intermediate.)

Cheers!
Andrew