John Hunter writes: > >>>>> "Jody" == Jody Winston <jos...@ma...> writes: > > Jody> Any pointers on either finding a Qt backend or writing one? > Jody> Thanks, > > Hi Jody, > > Sorry for the delay in getting back to you - I've been out of town for > a week. > > There have been several people who have expressed interest in A QT > backend - most recently Ted Drain at the JPL. Perhaps you two could > coordinate your efforts? I'd be happy to work with Ted. > The first place to start is in the file > matplotlib/backends/backend_template.py, which serves as a template > for backend writers and gives some instructions. I would follow the > model of one of the *Agg backends, eg TkAgg, GTKAgg, FLTKAgg and > WXAgg, which use Agg to render the image and place it in the GUI > canvas. This is a lot less work and you automiatically get the latest > matplotlib feature set for free. The basic idea is to use a GUI > independent image library that can then be reused across GUIs. > > The backends have to implement concrete versions of several interface > classes: RendererBase, GraphicsContextBase, FigureCanvasBase, > FigureManagerBase, NavigationToolbar2. If you opt to use Agg (or > Cairo) to do the drawing for you, you can leave out RendererBase and > GraphicsContextBase, which are the two that require the most work. I've also built a SWIG interface for Cairo so that I can embed it in a Qt application. The real reason that I am working on Cairo and matplotlib is that I want a portable way to display output from ATT's graphviz. From my quick look through matplotlib's code, it looks like this may be hard to do. So, if I continue this project, I'll also be asking how to render ploygons, ellipses, and text. Do you think that matplotlib is a good fit given my requirements?