Bill Allombert on Sat, 14 Jan 2017 17:56:12 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Implement SVG plotting


On Thu, Jan 12, 2017 at 02:30:06PM +0100, Jeroen Demeyer wrote:
> Dear pari-dev,
> 
> this patch implements SVG plotting in PARI. There is no GP interface (yet),
> it is meant to be used from libPARI. This is not properly tested yet, so
> consider this experimental work in progress.
> 
> This patch depends on
> 0002-Simplify-handling-of-graphic-option-and-check-validi.patch
> 0002-Move-plotting-frontend-to-libpari-initial-support-fo.patch
> 0001-New-function-outString_printf.patch
> 
> The interface is as follows:
> 
> 1. Call PARI_get_plot_svg() to set the hi-res plotting backend to the SVG
> backend. In gp, you can do:
> ? install(PARI_get_plot_svg, "v")
> ? PARI_get_plot_svg()
> 
> 2. Set the cb_plot_svg global variable to a callback function which will be
> called whenever a SVG plot is produced. The callback takes one argument, a
> const char* containing the text of the SVG file. For convenience, this
> callback function is pari_puts by default, so the SVG output is displayed
> textually.
> 
> 3. Call the GP function ploth() as usual.

How do you envision SVG to be used under GP ?

How libpari program will be able to use graphics ?

Could you give comment on all hunk of your patch
'0002-Move-plotting-frontend-to-libpari-initial-support-fo.patch' ?

Cheers,
Bill.