![](https://secure.gravatar.com/avatar/72d497503e4c6314bc0188a6ab961786.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
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/
![](https://secure.gravatar.com/avatar/6114858d84b0f40cf715f12237ab67a1.jpg?s=120&d=mm&r=g)
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