strange colormap behaviour with postscript printing

Ben Abbott bpabbott at mac.com
Fri Jan 16 14:56:20 CST 2009


On Friday, January 16, 2009, at 03:44PM, "John W. Eaton" <jwe at octave.org> wrote:
>On 25-Sep-2008, Francesco Potorti` wrote:
>
>| octave> imagesc(peaks());colormap(gray())
>| octave> print("gray.png")		# png image is good
>| octave> colormap(flipud(gray))
>| octave> print("udgray.png")     	# png image is good
>| octave> colormap(gray)
>| octave> print("gray.ps")g")     	# ps image is good
>| octave> print("udgray.ps"))     	# ps image is same as above!
>| 
>| Apparently, when printing to postscript, flipping the colormap has no effect!
>
>Is this a bug in gnuplot, or are we somehow using it incorrectly?
>
>I did
>
>  imagesc(peaks());colormap(gray());
>  colormap(flipud(gray))
>  drawnow ("x11", "/dev/null", 0, "debug.gp");
>
>to generate the attached file.  Then I edited the first two lines of
>the file to change them from
>
>  set terminal x11 enhanced title "Figure 1" 
>  set output "/dev/null";
>
>to
>
>  set terminal png
>  set output "udgray.png"
>
>and ran
>
>  gnuplot debug.gp
>
>to generate a png file that looks the same as what is displayed on
>the screen.  Then I changed the first to lines of the file to be
>
>  set terminal postscript
>  set output "udgray.ps"
>
>and the colors appear to be inverted.  I'm using gnuplot 4.2
>patchlevel 2.  Can someone check to see whether this problem is fixed
>in newer versions of gnuplot?  If not, please report the problem.
>
>Thanks,
>
>jwe

My gnuplot was built from the developers sources a few weeks ago. I also see the colors as inverted (x11 and png are the same and ps is inverted).

I'll file a bug report tonight.

Ben




More information about the Bug-octave mailing list