On 14/02/12 21:39, Steve R. wrote:
> Hi Everyone,
> 
> I often use the LaTeX package pgfplots to create plots for my 
> papers.  I've recently started using Veusz, though, and like it 
> very much.  I've been thinking that it would be nice to have 
> an interface with pgfplots.  From what I can tell, Veusz doesn't 
> have an export options for pgfplots.  Has anyone else thought 
> that this might be useful?  And if so, has anyone actually 
> started exploring what it would take to code this up?

Having a quick look at the PGF documentation, you could write a Qt paint
device to write some sort of PGF output. The main problem would be text.
It looks like you just write latex text, so I don't know how you'd get
the spacing or font sizes correct, or insert unicode symbols (perhaps
would work in xetex). You could export the text as curves, but that
would probably defeat the reason for exporting in PGF in the first place.

If you want to write latex text directly, ignoring the sizing issues,
etc, you'd have to replace the veusz text rendering code. This code is
at a higher level than the Qt paint device, making this difficult. I'm
also planning to add code which would make label positioning more
intelligent. Without detailed knowledge of font sizes, etc, this is code
wouldn't work.

So, unless you would like to export text as curves rather than text,
it's probably not that feasible currently. If curves are ok, it's
probably fairly easy.

One way to proceed would be to try to abstract as much drawing logic as
possible to into a higher level paint device. Perhaps extending the
QPainter device with text commands would work, or making a new paint
device at a higher level than Qt.

Jeremy



_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss

Répondre à