matlab画图 对标记符进行填充,根据MATLAB中的数据值使用标记填充颜色

在MATLAB中,用户想要根据数据矩阵的第三列数值填充标记符号,例如,用不同颜色填充方块。解决方案是通过创建颜色映射并逐个绘制带有特定颜色的方块来实现颜色编码。这种方法虽然效率不高,但易于理解。
摘要由CSDN通过智能技术生成

I am using matlab to plot three data series.

e.g.

0.4545 0.7676 10

0.3232 0.5432 20

Lets say this is a 100 x 3 matrix. (Lets call it A, also it is sorted according to A(:,1) )The third column is an additional number which ranges from 1 to 100.

I am using MATLAB to do the following:

plot (A(:,1));

hold on;

plot (A(:,2));

I am using the property editor to represent data-series A(:,1) in line format and A(:,2) with additional marker [square i.e --rs option in plot].

My question is, how do I fill the squares according to data in the 3rd column ?

Basically how do i go about color coding the 2nd data-series according to data in 3d column ?

In the figure attached, how do i fill color into the squares by data in A(:,3)

Would it be possible to make a gradation in the color by making a gradient ?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值