Hi List, is a direct usage of gnuplot in ConTeXt MKIV possible or does one need to invoke ConTeXt with a special parameter to create a dvi/ps file and convert it to pdf? if so an option of generating the graph and converting it to be included would be nice in that function, so that a direct usage in ConTeXt MKIV would be possible... Greetings Martin 'golodhrim' Scholz
On Wed, Feb 17 2010, Martin 'golodhrim' Scholz wrote:
is a direct usage of gnuplot in ConTeXt MKIV possible
Yes. Example: \usemodule[gnuplot] \setupGNUPLOT[terminal=png] \startGNUPLOTscript[sin] plot sin(x) \stopGNUPLOTscript \starttext \useGNUPLOTgraphic[sin] \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
On Wed, Feb 17, 2010 at 20:19, Peter Münster wrote:
On Wed, Feb 17 2010, Martin 'golodhrim' Scholz wrote:
is a direct usage of gnuplot in ConTeXt MKIV possible
Yes.
Example:
\usemodule[gnuplot] \setupGNUPLOT[terminal=png] \startGNUPLOTscript[sin] plot sin(x) \stopGNUPLOTscript \starttext \useGNUPLOTgraphic[sin] \stoptext
The context terminal should also work (that is: you may leave out the "\setupGNUPLOT[terminal=png]" or replace png with context that's default anyway), but you need some special effort to compile the terminal: git clone git://github.com/mojca/gnuplot.git ./prepare ./configure make If you would like to keep using that, you can do yourself and others the favor and write a request to gnuplot-beta@lists.sourceforge.net to include the terminal in gnuplot's CVS (they say that not enough people have tested and/or requested its inclusion). An alternative is to use the lua-tikz terminal. Peter has an almost-working version that should produce almost-valid (not yet optimized and maybe not completely future-proof yet) ConTeXt output, but is not included in official gnuplot version yet (and also the gnuplot module in ConTeXt needs to be polished a bit in that respect). Using tikz is not ready yet, but is doable if you have some patience. You may use [just-in-time or precompiled] PDF/PS/PNG terminals of course, but you won't be able to add TeX labels and use native document fonts. Mojca
participants (3)
-
Martin 'golodhrim' Scholz
-
Mojca Miklavec
-
Peter Münster