On Mon, 2009-09-07 at 17:49 -0400, Allin Cottrell wrote:
> On Mon, 7 Sep 2009, Ethan Merritt wrote:
> > On Monday 07 September 2009, Richard Henwood wrote:
> > > Hi All,
> > >
> > > I've been using Cairo (cairographics.org) a fair bit recently. I have
> > > not found a plotting library which is as mature as gnuplot.
> > >
> > > I understand that the wxWidgets terminal uses cairo.
> > >
> > > Has anyone considered the possibility of exposing the cairo context from
> > > within gnuplot/wxWidgets to the outside world?
> > The development version has two new drivers - pngcairo and pdfcairo,
> > the use the cairo library. Not sure if that's what you meant.
> > Both drivers will be in the version 4.4 release candidate, which I
> > hope we can put out soonish.
> I think what Richard was asking is whether the "cairo drawing
> context" struct, or "cairo_t", that is used internally by gnuplot
> could somehow be exposed programmatically. But I don't see how
> this could be done -- seems to me it would require building
> gnuplot as a library, not a stand-alone executable.
This is indeed what I am curious about. As you comment: if the 'cairo
drawing context' was exposed, it would then allow gnuplot to behave as a
library. i.e. if one was writing a cairo widget for a (typically GTK)
application, one may create a context (cairo_t), pass it to gnuplot
(along with some commands to plot a graph on it), and then return it to
the application for display.
In the first instance I thought I would raise this idea for discussion.
If it is technically feasible - and within the gnuplot mission - I think
there is an excellent opportunity to both have a extensive, publication
quality plotting library available to gtk/cairo application developers -
and increase usage of gnuplot.
>From a technical standpoint - I would imagine starting with the
wxWidgets terminal code would be a 'hacky' way to get something