Automatic construction of a colormap around the value zero

后端 未结 3 1415
无人共我
无人共我 2020-12-30 10:30

I often want to plot a difference image that ranges from some negative number to some positive one. The issue with that is that matlab\'s colormaps scale only from the min

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-30 11:16

    you can use this tool from the FEX. It generates blue-white-red colormap, with zero always corresponds to white color. For the case you want to include more than two colors, dig into the code and adapt it to your needs.

    There are a few more options in the FEX that do similar things (here's one, and another one)... enter image description here

提交回复
热议问题