#242 colors for lower and upper values out of cb range

closed-works-for-me
nobody
None
5
2010-09-13
2009-07-27
hmoto
No

In the current "set palette" implementation, the lower or upper values out of cb range are colored
with the lowest or uppermost color in the given palette for the image plot (or also pm3d plot).

The requested features are the new keywords "lowercolor COLORSPEC" and
"uppercolor COLORSPEC" for "set palette" to specify the colors for the lower and upper values
out of cb range.

I think that the different colors for the values out of cb range could be used to distingwish
the masked pixel with the valid pixels in image plot (or also pm3d plot). It also can be used
to indicate the saturated pixels in image plot.

The following is a sample code I think,

set palette defined (0 "white", 1 "red") lowercolor "gray" uppercolor "dark-red"
set cbrange [0:1]
plot "image.dat" with image

I think these keywords could be replaced by other appropriate ones.

Thank you.

Discussion

  • Mojca Miklavec

    Mojca Miklavec - 2009-07-30

    I did not test anything, but I think that the following should (or at least could) work:
    set palette defined (0 "gray", 0 "white", 1 "red", 1 "dark-red")
    or at least
    set palette defined (-0.001 "gray", 0 "white", 1 "red", 1.001 "dark-red")
    or something similar. This should work out-of-the box without patching anything and one doesn't need to remember any new keywords. Maybe it doesn't work out of the box due to some "boundary case", but that should be easy enough to fix should someone discover that it doesn't work as expected.

     
  • Ethan Merritt

    Ethan Merritt - 2010-09-13

    As noted, this is already possible using "set palette defined".
    Here's another example:
    set palette defined ( 0 "black", 0.001 "white", 0.999 "green", 1.0 "black" )

     
  • Ethan Merritt

    Ethan Merritt - 2010-09-13
    • status: open --> closed-works-for-me
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks