Re: gnuplot

0 views
Skip to first unread message

Mojca Miklavec

unread,
May 16, 2006, 2:01:10 AM5/16/06
to gnuplot...@googlegroups.com
On 5/14/06, Hans Hagen wrote:
> Hi,
>
> I was thinking about Mojca's width-of-labels problem. Once we have lua
> in place it should not be that difficult to make a mechanism that works
> as follows:
>
> - context calls gnuplot and opens a socket
> - and starts waiting for gp to finish
> - when gnuplot needs dimensions it talks back via the socket
> - tex executes the command send by the socket
> - etc
>
> it needs some thinking but i thing that it is possible

I don't understand the stuff about TeX internals enough, but this sounds great.
I probably can't do anything about it so far anyway, so please tell me
if anything will be ready to start with.

I guess that there are many other programs as well which could make
great usage if TeX was available as a library (or at least something
that must not be written into a file, executed, read from a file,
processed, written to a file again, ... but can be processed on the
fly), but I might have completely misunderstood the point.

Concerning the images: I might also try to modify/play with the new
"mpto" if pdftex would need to big changes: in the same way as it
processes textext, it could process everything between
"start_image_data ... stop_image_data" (or whatever the command would
be called), produce PNG image on the fly and include it into the
document. (But I thought that there is a much simpler way, similar to
the usage of transparent colors for that, which would only require to
wrap a string inside some starting and ending string.)

Concerning the \textext: thanks for the example. I'll play a bit with
it and report the results.

Concerning multiple gnuplot graphics: of course one can use
\startGNUPLOTgraphic[first]
plot "first.dat"
\stopGNUPLOTgraphic
\startGNUPLOTgraphic[second]
plot "second.dat"
\stopGNUPLOTgraphic
\startGNUPLOTgraphic[third]
plot "third.dat"
\stopGNUPLOTgraphic

but this would require three gnuplot executions, which is probably
less efficient than
\startGNUPLOTgraphic[multiple]
plot "first.dat"
plot "second.dat"
plot "third.dat"
\stopGNUPLOTgraphic

But one would still like to refer to single plots in order to be able
to use \placefigure for example.

For that purpose \startMPcode/\startMPpage probably has to be replaced
with something more suitable, but with what? The user should be able
read from files and to refer to the name of the graphic and its
number, like \useGNUPLOTgraphic[multiple][n=2,scale=0.8] in the
previous case (or simply iclude all the graphics form a single gnuplot
run).

Thanks a lot,
Mojca

Reply all
Reply to author
Forward
0 new messages