pngcairo terminal: "crop" does different things if background color is specified

Dima Kogan <[email protected]> Mon, 28 Nov 2022 21:52:19 -0800
Newsgroups gmane.comp.graphics.gnuplot.devel
Message-ID <[email protected]>
Hi. I'm using a recent gnuplot shipped in Debian, and I'm seeing an odd
behavior.

I make a trivial .png plot like so:

  set terminal pngcairo size 1024,768 notransparent crop
  set output "/tmp/tst.png"
  plot x

Because of the "crop", the resulting image size is a bit smaller than
requested. "file /tmp/tst.png" says:

  tst.png: PNG image data, 995 x 751, 8-bit/color RGB, non-interlaced

Not entirely sure why it's cropping anything here, but that's how it is.
But if I change the background color by adding to the end of the "set
terminal" command:

  background "#e8dfd0"

then I get a full 1024x768 image. This shouldn't happen: the background
color should not be doing anything to the image size.

Thanks!


_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta