[NTG-context] new tikz terminal for gnuplot

Mojca Miklavec mojca.miklavec.lists at gmail.com
Wed Jan 19 05:58:41 CET 2011


Dear gnuplot lovers,

Peter Hedwig is soon going to submit a patch to gnuplot that fully
supports ConTeXt via TikZ output. Its advantage over ConTeXt terminal
is that one won't need to recompile gnuplot in order to be able to use
it (the gnuplot team at least accepted TikZ terminal if they didn't
accept the one for ConTeXt) which is great news.

I need to fix some tiny bits before I upload a new version to ConTeXt
modules (however the files are here:
https://github.com/mojca/context-gnuplot). I can also commit changes
done by Peter to https://github.com/mojca/gnuplot if they won't be
added any time soon (but if anyone else wants to test it, feel free to
ask for the files).

An example of usage follows below.

Here's his message (the comment about TeX Live is related to the
long-standing bug in TikZ for ConTeXt; I'm just thinking about
uploading a patch for TikZ to TLContrib ...):


I am sorry, that it stalled a bit, but I worked on it secretly ;) But
now I think it is time to release what is done so far to anyone who is
willing to test it.
Here is a brief list of changes to the gnuplot CVS version:
* support for ConTeXt and plain TeX
* removed dependencies for LaTeX packages other than TikZ
* needs TikZ Version >= 2.0
* better support for saving terminal options with gnuplot 'save' command
* fixed "overflow" on negative coordinates that are outside of the crop box
* merged all recent patched from murphy-md and Ethan
Unfortunately it is the Context output that does not compile with the
most recent Context version I installed from TeXLive 2010 and the
http://tlcontrib.metatex.org/2010/ repository. But I remember it
working with an older version so I hope this can be fixed easily ...

Mojca



\usemodule
	[gnuplot]
\setupGNUPLOTterminal
	[tikz]
	[width=6in,
	 height=4in]
\setupGNUPLOTterminal
	[context]
	[dashed=no]

\setupbodyfont[iwona]

\starttext

\startGNUPLOTinclusions
set format y "%.1f"
\stopGNUPLOTinclusions

\startGNUPLOTscript[a]
plot sin(x)
\stopGNUPLOTscript
\startGNUPLOTscript[b]
plot sin(x) lc 4 lw 2, cos(x) lw 3
\stopGNUPLOTscript

\framed{\useGNUPLOTgraphic[a]}
\framed{\useGNUPLOTgraphic[b]}

\setupGNUPLOT[terminal=tikz]

\framed{\useGNUPLOTgraphic[a]}
\framed{\useGNUPLOTgraphic[b]}

\stoptext


More information about the ntg-context mailing list