2D plot with z in color and magnify variations near zero
1 次查看(过去 30 天)
显示 更早的评论
I would like to make the variations near zero more clear. what i get now is
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169006/image.png)
and i would like the colorbar looks like
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169008/image.png)
So more color variations are near zero.
0 个评论
回答(1 个)
Mary Abbott
2017-11-3
Hello,
What you are seeing is probably caused by some outlying values that are much higher and lower than the average value of your data. These outliers widen the range of values the colormap has to represent, so small variations around 0 are hard to see. To see more variations around 0, you can change the range of the colormap using the "caxis" function. If you change the range to be between -0.1 mm and 0.1 mm, values above 0.1 mm will all be clipped to the last color in the colormap, and values below -0.1 mm will be clipped to the first color in the colormap. For more details on this and an example, please refer to the following link:
https://www.mathworks.com/help/matlab/creating_plots/change-mapping-of-data-values-into-the-colormap.html
Also, the example colorbar that you want is using the "jet" colormap. You can change the plot to this colormap with the following command:
>> colormap jet
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!