biggles
biggles copied to clipboard
expand support to new/multiple backends
plotutils does not seem to be actively maintained at the moment. Thus I think we should try and allow for plotting with a different backend. @esheldon suggested Cairo (http://cairographics.org/).
Can @nolta comment on the layout mechanism for biggles? And such things as picking axis ranges, etc? I think the defaults in biggles are excellent and in good taste. In addition to the nice object oriented api, these are what drew me to biggles. I would want to preserve them if we supported another back end. Do you mostly hand that off to plotutils or do you do that yourself in the python code?
If it is in the python code then it might be straightforward to port to cairo.
I see in your winston Julia package, which uses cairo, the plots look fairly similar, so that is encouraging.
http://winston.readthedocs.org/en/latest/examples.html
Yes, porting biggles to cairo should be straightforward.
I have been reading the Cairo docs. This should be possible. The xwindows event loops seem a touch tricky to get right and not buggy.
another alternative backend that looks interesting is pyx. I think it can do everything biggles does, but is a bit clunky to write. It is pure python. Would just need to wrap everything in nice classes. For the show() command would need to spawn to an external program.
Yeah. I ran into that. Cairo has pycario which should put everything in Python too. I will look again.
I have been reading the pyx docs and their support for transparency seems limited.
http://pyx.sourceforge.net/manual/color.html#transparency
This is the major motivation for me for moving to a new backend.
Thus I think cairo is probably a better choice since I think it supports this well.
if we are willing to write pdf then convert to png (and then possibly display that on the screen) then pyx could work.
This all sounds clunky and slow. I am thinking supporting both backends (plotutils and Cairo+gtk) is the way to go. If you don't have gtk, you can revert back to plotutils. Thoughts?
I think cairo is definitely worth looking into.
Also I looked into it, and I think I could hack together a barebones X11 image display that would be as fast as plotutils current one (gtk is unbearably slow over the network)
That sounds good. Cairo's docs seem to imply that it really wants you to use gtk. But hopefully this is not a strict requirement.
I think the idea is to have cairo write directly to some display buffer, which is I think what plotutils does.