[NTG-context] running gnuplot failure
Hans Hagen
j.hagen at xs4all.nl
Mon Mar 30 01:48:23 CEST 2020
On 3/29/2020 8:32 PM, Jan-Erik Hägglöf wrote:
> Hi!
>
> I have tried to run the following codeexample with no success
>
> \usemodule
> [gnuplot]
in lmtx gnuplot can be done like this (here i just write the file but it
can be external or a saved buffer or ... ):
\usemodule[gnuplot]
\startluacode
io.savedata("m-gnuplot-demo.gp", [[
set format xy "$%g$"
set title 'This is a plot of $y=\\sin(x)$'
set xlabel 'This is the $x$ axis'
set ylabel 'This is the $y$ axis'
plot [0:6.28] [0:1] sin(x)
]])
\stopluacode
\starttext
\externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm]
\externalfigure[m-gnuplot-demo.gp][conversion=svg,width=8cm]
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
More information about the ntg-context
mailing list