gnuplot heat map color range

守給你的承諾、 提交于 2019-12-05 05:25:46

The "set palette defined" command maps the grey values that you would get if you were plotting using greyscale onto a color palette; the scaling to min -> 0 and max -> 1 is how it's supposed to work. If you want to make a set of plots all with the same scaling of the data, you want to use the "set cbrange" command. For example,

  set cbrange [0:0.5]
  set palette defined (0 "blue", 1 "red")
  splot '++' using 1:2:(sin($1)*cos($2)) w image

gives you an image plot with the maximum data value of 0.5 mapped to red and 0 mapped to blue. Subsequent plots, like

  splot '++' using 1:2:(0.5*sin($1)*cos($2)) w image

will use the same scaling, so they can be compared.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!