|
From: Ethan M. <merritt@u.washington.edu> - 2005-03-26 23:26:16
|
On Tuesday 01 March 2005 02:33 pm, Ethan Merritt wrote:
> In particular I object to the following contamination of core
> routines with terminal-specific code. If we need a new terminal
> entry for this, then so be it.
It has belatedly occurred to me that this approach has another
problem as well - it breaks in multiplot mode. Each sub-plot
within the multiplot sequence triggers a repeat call to write
out the {\includegraphics{foo}} statement, and by the time these
are later executed by LaTeX the included file "foo.eps" contains
only the final composite set of all sub-plots. So instead of
layering, you end up with redundant redrawing of the same final
composite plot on top of itself.
To do this properly, I think you would need to save each subplot
to a separate file and emit a corresponding \includegraphics
statement somewhere in term->suspend() or possibly in term->resume().
Which makes me wonder if the original ugliness can be resolved
without addition of any new terminal API calls, by suitable use of
the existing term->suspend() and term->resume() mechanism.
The PostScript driver proper does not use suspend/resume, but
maybe the merged epslatex/pslatex code should do so.
> having the core code writing this garbage is just really really ugly.
>
> --- gnuplot/src/graphics.c 2005-02-24 12:14:16.000000000 -0800
> +++ gnuplot-cvs/src/graphics.c 2005-03-01 12:49:19.368297032 -0800
> @@ -1482,11 +1482,6 @@
> /* PLACE ARROWS */
> place_arrows( 0 );
>
> - /* Print \includegraphics here when using back option for text */
> - if (term->name=="epslatex" && gpoutfile)
> - fprintf(gpoutfile, " \\put(0,0){\\includegraphics{%s}}%%\n",
> - pslatex_auxname);
> -
> /* WORK OUT KEY SETTINGS AND DO KEY TITLE / BOX */
> if (lkey) { /* may have been cancelled if
> something went wrong */ /* just use keybox.xl etc worked out in
> boundary() */
>
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington 98195-7742
|