Re: [NTG-context] gnuplot for Mojca
On 1/2/06, Peter Münster wrote: Hi Mojca, if you're still looking for a gnuplot module, here is one: Yes, I'm still looking for it. http://pmrb.free.fr/work/OS/ConTeXt/t-gnuplot.tex Thanks a lot. I've learnt a lot from the example, it's only that in the way it's written now it's not compatible with windows. I've made a gnuplot.bat. It can be called with gnuplot somescript epstopdf somescript where somescript is something like set terminal postscript eps # should be added automatically set output someuniquename # should be added automatically plot sin(x) # between \startGnuplot ... \stopGnuplot My question is: how can I put this into the same buffer (file) without using OS-specific commands? (piping didn't work) The rewritten version of the module works if I add the first two lines manually between \startGnuplot ... \stopGnuplot, but that should be done automatically by the module itself. I looked into metafun code, but it's still too complicated for me to understand it and use it for gnuplot. Gnuplot would also need some kind of \startGnuplotinclusions for stuff like set nokey set xlabel time plus the lines for setting the terminal which would automatically be added. (I don't like the postscript terminal itself, but that module s a good start.) Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] gnuplot for Mojca
On Tue, 3 Jan 2006, Mojca Miklavec wrote: Thanks a lot. I've learnt a lot from the example, it's only that in the way it's written now it's not compatible with windows. Hello Mojca, if you are using Windows, you can install MinGW, it's free and bash is included. Gnuplot would also need some kind of \startGnuplotinclusions for stuff like set nokey set xlabel time plus the lines for setting the terminal which would automatically be added. or something like \setupGnuplot with keys=vals! (I don't like the postscript terminal itself, but that module s a good start.) At least, it's not bitmap. But there is a white border around the plot. It would be nice to have a clipping-option in \externalfigure. Cheers, Peter -- http://pmrb.free.fr/contact/ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] gnuplot for Mojca
On 1/3/06, Peter Münster wrote: On Tue, 3 Jan 2006, Mojca Miklavec wrote: Thanks a lot. I've learnt a lot from the example, it's only that in the way it's written now it's not compatible with windows. Hello Mojca, if you are using Windows, you can install MinGW, it's free and bash is included. OK, that could be file for me and maybe for two others, but this can't be a general solution. (Beginners wouldn't install it and the skilled ones have linux anyway.) So my question for gurus remains: how to write a macro, so that \startGnuplotinclusions set title trigonometry \stopGnuplotinclusions \startGnuplot plot sin(x) \stopGnuplot \startGnuplot plot cos(x) \stopGnuplot would result in one file with set terminal postscript set output filename1 set title trigonometry plot sin(x) and the other one with set terminal postscript set output filename2 # If too complicated, the filename may remain the same set title trigonometry plot cos(x) Out of curiosity: does metafun check if the buffers were changed, so that compiling again the same file is skipped next time? (For a little module as this one it's too little gain for too much anyway.) Gnuplot would also need some kind of \startGnuplotinclusions for stuff like set nokey set xlabel time plus the lines for setting the terminal which would automatically be added. or something like \setupGnuplot with keys=vals! Well, ... yes. That also, of course. Those could be use to set engine to postscript/eps/metapost/png/... or even LaTeX. (But for the beginning, I would be greatful for even the dummiest possible solution.) If ConTeXt terminal would be written, maybe this could be used also for setting symbols, default colors, ... etc. (I don't like the postscript terminal itself, but that module s a good start.) At least, it's not bitmap. I use LaTeX as the terminal otherwise (but your module can be modoified to use LaTeX terminal and convert into PDF as well). If I will find some time and additional motivation (sorry, less motivation for other things), I would like to modify the metapost.trm. It's only 1000 lines (postscript is a bit longer), but very well structured code and much better understandable than TeX which is still cryptography for me. (Even in that case I would still need a lot of help from the ConTeXt side.) But there is a white border around the plot. It would be nice to have a clipping-option in \externalfigure. I would prefer to leave the border in this case as the default behaviour (for example if you have two graphs with different labels, you want the graphs to have the same size, not cropped because of slightly different name for the y axis), but I vote for that feature too. (Hans?) Some time ago Hans mentioned that texexec can crop, but I didn't manage to make it work (it was converting from PDF to PS and back, but it didn't crop anything). There's a nice working script on CTAN (http://www.ctan.org/tex-archive/support/pdfcrop/) for cropping. I guess that texexec could do that as well, but some half year ago as I tried it, I had no luck. Thanks again for all that, Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] gnuplot for Mojca
Mojca Miklavec wrote: Some time ago Hans mentioned that texexec can crop, but I didn't manage to make it work (it was converting from PDF to PS and back, but it didn't crop anything). There's a nice working script on CTAN (http://www.ctan.org/tex-archive/support/pdfcrop/) for cropping. I guess that texexec could do that as well, but some half year ago as I tried it, I had no luck. (new)pstopdf can crop (bound) long ago i made a perl script called cropcrap which will be in the next distribution under the name pdftrimwhite (the more decent name as suggested by karl berry); however, this script works on pdf files Hans ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] gnuplot for Mojca
Hi Mojca, if you're still looking for a gnuplot module, here is one: http://pmrb.free.fr/work/OS/ConTeXt/t-gnuplot.tex Cheers, Peter -- http://pmrb.free.fr/contact/ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context