Zerocolor

Set colormap entry for zero values to specified RGB color

您现在正在关注此提交

The images are generated by the examples in the help section.

zerocolor(CLR)
Updates current figure's colormap so that zeros get color CLR. CLR is a vector between 0-1, e.g. [.4 .2 .9] or a standard MATLAB color string.

cmap = zerocolor(H,CLR)
Returns the updated colormap cmap based on the figure with handle H.

See the function help for all the syntax options. Not hard to adjust the code for an arbitrary value other than zero.

feedback is welcome

引用格式

Jurgen (2026). Zerocolor (https://ww2.mathworks.cn/matlabcentral/fileexchange/39985-zerocolor), MATLAB Central File Exchange. 检索时间: .

类别

Help CenterMATLAB Answers 中查找有关 Color and Styling 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0.0