是否可以将颜色条属性添加到 maltlab 图中?
我真的很想知道是否有一种方法可以添加我们通常在曲面或网格中找到的颜色条属性,但这次是为了一个简单的绘图。
谢谢你!
I'd really like to know if there's a way to add the colorbar properties we usually find in surface or mesh, but this time for a simple plot.
Thanx you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除了专家在答案中所述之外,您还可以定义自己的颜色图。我建议您根据
HSV
方案对其进行建模,因为您想要改变强度。也就是说,您可以选择所需的颜色并仅改变其强度值。In addition to what gnovice stated in their answer you can define your own colormap. I would suggest you model it off of a
HSV
scheme since you're wanting to vary the intensity. That was you can select the color you want and vary just the intensity value of it.您是想问如何在绘图中添加颜色条吗? COLORBAR 函数可以做到这一点,但它实际上只是如果绘图中有一个使用 colormap< 的对象,则非常有用/a>,例如 表面 或 < a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/image.html" rel="nofollow noreferrer">图像。
对于简单的线图,您最好使用 图例。
Are you asking how to add a colorbar to a plot? The COLORBAR function does that, but it's really only useful if you have an object in your plot that uses a colormap, like a surface or an image.
For simple line plots, you're probably better off going with a legend.