I wasn't aware of the GR framework. I certainly looks interesting. However, it 
does _not_ look more light weight than cairo. Just having Qt as a dependency is 
an immediate no-go to me. At least for a default backend (unless I'm missing 
something and you can easily get both binaries w/o Qt dependency and build it 
w/o it).

Also it obviously does a lot more than cairo. It's a full fledged visualization 
library.

For ggplotnim's purposes the only advantage it would have would be access to 
more backends, as far as I can see.

Adding a new backend to ginger is in principle as easy as providing these procs:

[https://github.com/Vindaar/ginger/blob/master/src/ginger/backendDummy.nim](https://github.com/Vindaar/ginger/blob/master/src/ginger/backendDummy.nim)

And see the actual cairo backend:

[https://github.com/Vindaar/ginger/blob/master/src/ginger/backendCairo.nim](https://github.com/Vindaar/ginger/blob/master/src/ginger/backendCairo.nim)

So feel free to add a new GR backend to ginger if you'd like!

To me the most important features I want from backends are:

  * png, pdf support: provided by cairo already
  * LaTeX handling of labels / text: will be done via a tikz backend (good to 
see that apparently GR is going that route for LaTeX too!)
  * an interactive viewer: not implemented, but can also be done via cairo. The 
more challenging aspect is writing the logic that allows for updates in the 
first place (and if possible incremental updates of the plot, but that's hard 
with the current implementation I think)
  * a Vega backend: well, has to be done by writing a Vega backend



I can totally see how GR can be a great library to build a powerful 
visualization library, if being used from the onset. It seems to take care of a 
lot of annoying details I had to get right.

Reply via email to