Changes

Jump to navigation Jump to search
536 bytes added ,  23:58, 13 July 2020
lmtx example for gnuplot inclusion
"C:\Program Files\gnuplot\bin\wgnupl32.exe" %*
:(if that was the binary name) and put that file to a <i>"visible place"</i> (has to be found in PATH). Please note: if calling <code>gnuplot</code> from cmd works for you, there is no need to do anything extra.
* '''[[write18Write18]]''' has to be enabled
=== To use the ConTeXt terminal (recommended) ===
==== Windows ====
\useGNUPLOTgraphic[tan]
\useGNUPLOTgraphic[sin][width=10cm]
</texcode>
 
== Example with externalfigure ==
 
In [[LMTX]] we can use externalfigure for gnuplot files like this:
 
m-gnuplot-demo.gp
<texcode>
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)
</texcode>
 
Then including it in the .tex file with externalfigure and svg conversion:
 
<texcode>
\usemodule[gnuplot]
 
\starttext
\externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm]
\stoptext
</texcode>
* in [[MetaPost]]
** [[source:m-graph.tex|m-graph]] Module (see [http://cm.bell-labs.com/who/hobby/cstr_164.pdf Drawing Graphs with MetaPost] by John D. Hobby)
** functions in [[MetaFun - MetaPost in ConTeXt|MetaFun]], see [[manual:metafun-s.pdf|metafun-s.pdf]], section 9.3
* others
** [http://pyx.sourceforge.net/ PyX] - graph drawing through python interface with TeX typesetting & PostScript capabilities
174

edits

Navigation menu