Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

nonsmooth color change in pm3d

Help
2007-04-04
2013-02-10
  • Denis Zakharov
    Denis Zakharov
    2007-04-04

    Is it possible to plot a color/gray map (using pm3d) with single gray/color value associated to each drawn pm3d quadrangle
    (no smooth color change among vertices)? I do not need averaged z-axis  value (according to `corners2color <option>`) but the exact value ( 0 corresponds black, 1 - yellow, 0.5 - red).

     
    • Denis Zakharov
      Denis Zakharov
      2007-04-05

      Now I use the following script:
      set dgrid3d 3,3
      set pm3d
      set pm3d map
      #set pm3d corners2color ?
      set hidden3d
      set palette

      splot '1.dat'

      ________________________________
      for example 1.dat:
      1       2       0
      1       3       0
      1       4       0
      2       2       .5
      2       3       1
      2       4       .5
      3       2       0
      3       3       0
      3       4       0

       
    • The problem is with your data file. 

      If you don't want averaging of z values, you shouldn't be using dgrid3d.  So you should change your datafile in order not to need it.  See "help splot datafile" and "help glossary" to see how.