|
From: Ethan A M. <merritt@u.washington.edu> - 2009-04-04 17:42:29
|
On Saturday 04 April 2009, Mojca Miklavec wrote: > Hello, > > I'm using gnuplot a lot for different kinds of graphs. I'm mostly > using the TeX terminal (my own one, ConTeXt), but as soon as one wants > to draw a complicated graphic (it's enough to request this: > http://gnuplot.sourceforge.net/demo_4.3/pm3d.8.png) the following > happens: > - TeX runs out of memmory very quickly > - even if TeX manages to process the graphic, desplaying it becomes > extremely slow if you ask any PS/PDF viewer to display one million > points or lines; it needs to draw every line separately even if most > of them are hidden Conclusion: TeX is very bad at graphics. That is not what it was designed for. It is the wrong tool for the job. > If I use GD terminal, then I'm very limited with the labels I use (I > cannot use TeX tricks on them, the fonts don't scale, switching fonts > is very complicated and not too much platform-independent; I'm > copiling my documents on multiple platforms) etc. etc. I do not understand these comments. The fonts are indeed scalable, and are entirely platform-independent, moreso than LaTeX fonts are since only the original machine, not the viewing machine, needs to have the fonts installed. In either case you have to have the support package installed (TeX in one case, libgd in the other). > I would like to create a terminal that would combine some "pixel" > terminal with a TeX terminal. The same has been done with epslatex > where PS takes care for graphical part of the plot and TeX is used for > generating labels. I would like to do the same, but in the way that > drawing pixel data is delegated to some third terminal that generates > a PNG figure (could be GD or pango or whatever) and TeX labels are > handled with the TeX terminal. TeX would then include the generated > PNG image and draw true labels on top of image. Here is another suggestion for how one might do it: 1) Create a latex terminal variant that simply assumes that the graphics part of the plot already exists. The current CVS code stores relevant information about plot boundaries and axis scaling from the previous plot, so it should be possible to place all the text elements appropriately. 2) Teach one or more of the other terminals (gd, cairo, post) to accept a terminal option to draw all text invisibly. 3) Perhaps introduce a new top-level command that runs the plot through these two drivers sequentially. Doing it manually should be easy enough, however. Something of the sort would also be useful for the svg and canvas terminals, whose respective output languages are not well suited for direct representation of pixel images. Instead they expect to be able to refer to a PNG image in the appropriate position, similar to the way latex can embed an eps or pdf image. > My main question is: how difficult is the configuration process that > needs to be done in the background? I know a bit about programming and > managed to write a terminal that works OK, but I don't understand a > bit about configuring the bits and pieces, so that the code compiles > properly when using different libraries. Are you thinking of the autoconf tools? They are indeed a nightmare. But I would not worry about that until you actually have a new terminal ready to go. What new libraries did you have in mind? -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |