#1056 pm3d map does not display correct colors

closed-works-for-me
nobody
3D plot (84)
5
2011-11-12
2011-11-03
Anonymous
No

I am using gnuplot 4.5.0 downloaded from CVS today (11/3). System:

2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

I am plotting gridded data using pm3d map. Commands used:

> set pm3d map
> set palette
> splot 'dat' us 1:2:12

The column of data corresponding to x = 24.5 has all z values = 0 (column 12 is 0 for all x = 24.5). This can be verified by plotting without pm3d and looking at the 3D plot.

However, in the color map produced by splot, the column corresponding to x = 24.5 has different colors (not all 0). Instead of producing a column of a single solid color equal to 0, it has a variety of different colors/shades.

This is very frustrating since I had thought the data was wrong until I finally found gnuplot was the problem!

I am attaching the data file

Discussion

  • data file

     
    Attachments
    dat
  • You should read the documentation about 'set pm3d', especially the part 'color_assignment'. Try:

    set pm3d map corners2color c1
    splot 'dat.dat' u ($1-0.5):2:12

    Christoph

     
  • Ethan Merritt
    Ethan Merritt
    2011-11-03

    • status: open --> open-works-for-me
     
  • Ethan Merritt
    Ethan Merritt
    2011-11-03

    Since your data is already gridded, it is probably simpler to treat it as pixel data rather than as a pm3d surface.

    plot 'dat' using 1:2:12 with image

     
  • Ethan Merritt
    Ethan Merritt
    2011-11-12

    • status: open-works-for-me --> closed-works-for-me