是否可以将颜色条属性添加到 maltlab 图中?

发布于 2024-09-04 03:05:44 字数 72 浏览 2 评论 0原文

我真的很想知道是否有一种方法可以添加我们通常在曲面或网格中找到的颜色条属性,但这次是为了一个简单的绘图。

谢谢你!

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

可是我不能没有你 2024-09-11 03:05:45

除了专家在答案中所述之外,您还可以定义自己的颜色图。我建议您根据 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.

冰葑 2024-09-11 03:05:44

您是想问如何在绘图中添加颜色条吗? 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文