|
From: Ethan M. <eam...@gm...> - 2020-09-24 21:55:02
|
On Thursday, 24 September 2020 11:30:11 PDT Henri Menke wrote:
> Dear Ehtan,
>
> I just wanted to ask what is the status of this patch? It doesn't
> change the default behaviour but makes the notransparent option actually
> do something. If you want I can write sentence in the documentation
> about the layer ordering.
As I understand it, you want this not because of a problem in the gnuplot
latex output but rather because of a bug/misfeature/quirk of some downstream
program that fails to validate the pdf file produced by running pdflatex on
the gnuplot output. Do I have that right?
The thing is, if a user selects the "notransparent" option with your patch
applied then the output from gnuplot is incorrect.
It loses the "back" layer of text, including the default axis tic labels.
This can be partially worked around by
set tics front
set grid front
but then the axis borders and tics in a 3D plot incorrectly occlude the
plotted surface. This has the paradoxical effect of making the
"notransparent" option cause a pm3d surface to look transparent!
Therefore I do not like the patch as it stands. In order to produce
correct 3D output further changes to the program would be required
to separate the handling of border text and lines.
Would it not be better to document that for some purposes
it may be helpful to post-process the png image?
mogrify -flatten myfigure-inc.png
I think that achieves exactly the same result (including the problematic 3D border)
at the cost of one extra step. But I could be wrong; maybe your validation program
still doesn't like it eve after flattening?
] cheers,
Ethan
>
> Cheers, Henri
>
> On 21/08/20, 13:34, Henri Menke wrote:
> > Currently the cairolatex terminal does not respect transparency options
> > given in the terminal setting. In this minimal example the
> > notransparent option is ignored:
> >
> > set terminal cairolatex png notransparent
> > set output "test.tex"
> > plot sin(x)
> >
> > Running this through gnuplot and then using `file' reveals that the
> > alpha channel is still present:
> >
> > $ gnuplot test.gnuplot && file test.png
> > test.png: PNG image data, 1500 x 900, 8-bit/color RGBA, non-interlace
> >
> > With this patch the transparency setting will be honoured. The current
> > default setting of implicitly assuming transparency is unaltered.
> > ---
> > term/cairo.trm | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/term/cairo.trm b/term/cairo.trm
> > index ee748dfe2..3ef76ecc6 100644
> > --- a/term/cairo.trm
> > +++ b/term/cairo.trm
> > @@ -849,7 +849,7 @@ void cairotrm_graphics()
> > plot.background.g = cairo_params->background.g;
> > plot.background.b = cairo_params->background.b;
> > gp_cairo_set_background(cairo_params->background);
> > - if (ISCAIROLATEX || cairo_params->transparent)
> > + if (cairo_params->transparent)
> > gp_cairo_clear_background(&plot);
> > else
> > gp_cairo_solid_background(&plot);
>
>
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>
|