On Sat, Mar 15, 2008 at 11:18 AM, Hans Hagen wrote:
>
> Mojca Miklavec wrote:
> > On Fri, Mar 14, 2008 at 6:51 PM, Aditya Mahajan wrote:
> >> On Fri, 14 Mar 2008, Hans Hagen wrote:
> >>
> >> > so, if you have specific wishes ... now is the time to let them know
> >>
> >> Some questions (and hidden wishes)
> >>
> >> Does this mean that text between metapost graphic and context can be
> >> really transparent? Currently \sometxt does not work with all macros,
> >> (like an old feature request by Mojca to have two optional arguments for
> >> setting the font in the gnuplot module). Will mplib mean that the
> metapost
> >> code can place any tex box at the desired location?
> >
> > Now that you mention it: I still need to adapt the gnuplot module to
> > mkiv, but I'm a bit afraid of asking for help. (The most important
> > thing would be to get rid of that stupid catcode trickery inside
> > \startGNUPLOTscript ... \stopGNUPLOTscript that always tends to fail
> > when one needs it, and to have one-to-one conversion, so that %,#, $,
> > .... will have no special meaning.) Then, it would probably be a nice
> > benchmark to discover bugs in the library :)
> >
> > For example, demos from this page (I'm not saying that they're too
> > useful since 100x100 is too low resolution anyway):
> > http://gnuplot.sourceforge.net/demo_4.3/pm3d.html
> > currently all fail because of the "out-of-memory" problem (10.000
> > times "fill unitsquare scaled ... shifted ... withcolor ..."), but
> > this might be a ConTeXt problem as well (the text inside
> > \startMPgraphic ... \stopMPgraphic probably needs to be stored
> > somewhere in TeX, even if there's no need for that).
>
> let's discuss this a few months from now when i have more code in place
>
> btw, how difficult would it be to add a lua api to gnuplot, in which
> case we could communicate via lua tables
Peter Hedwig has already done some work on it:
http://peter.affenbande.org/gnuplot/
What his patch does: one calls gnuplot normally, and then, when you say
set term lua dashed fontsize 15
"dashed fontsize 15" is parsed by lua. Then, gnuplot does its work,
and calls functions:
set_linestyle(3)
set_color(...)
draw_line(...)
What Peter did was a mapping from C to lua, so the actual code that
does "draw_line" is actually implemented in lua and can easily be
changed and/or adapted without recompiling gnuplot.
He now "converts" those function calls into TikZ Code, but that could
easily be adapted into anything.
So: output has already been implemented (and would "only" need to be
adapted), while input might need some tweaking. I'm sometimes using a
rather simple C++ library which opens gnuplot and pipes "set terminal
...", "plot ..." commands to gnuplot, so one can pass a C table to
gnuplot. I could take a look at how it's done there. How do you
imagine passing lua tables to gnuplot?
Mojca
PS: no need to say that even though his terminal is much more popular
(it's the only decent LaTeX terminal I know) than the one for ConTeXt,
I have seen zero discussion on the gnuplot mailing list about any
intentions to integrate that code into gnuplot core.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________