matlab - 如何调整组合图中单条线的线宽?
问题描述
当我为这种类型的图调整线宽时,它可以工作。
plot(x1,y1, 'm','Linewidth',1)
hold on
plot(x2,y2, 'b','Linewidth',2)
hold on
plot(x3,y3, 'r','Linewidth',3)
hold on
plot(x4,y4, 'c','Linewidth',4)
hold on
plot(x5,y5, 'o','Linewidth',5)
但不是当我这样做的时候。
plot(x1, y1, 'm','Linewidth',1,x2, y2, 'b','Linewidth',2,x3, y3, 'r','Linewidth',3,x4, y4, 'c','Linewidth',4,x5, y5, 'o','Linewidth',5);
我得到一个错误。
是否可以调整组合图的线宽?
解决方案
是否可以调整组合图的线宽?
不(是的,但不是以更清洁的方式)。
如果你想要一条线,你可以一起调整所有参数。如果你想控制它们中的每一个的外观,你需要做单独的图。
您可以访问属性,但我怀疑这只是更长且不太清楚,所以不确定它是否真的是正确的解决方案。
h=plot(x1, y1, x2, y2, ...);
h(1).LineWidth=1;
h(2).LineWidth=2;
...
推荐阅读
- python - 仅当出现在特定模式之后的字符才从 HTML 字符串中删除
- node.js - 访问令牌与刷新令牌 NodeJS
- angular - 离子/角度ngFor和点击功能
- java - 如何从 MYSQL 存储过程中调用 Java 文件?
- asp.net - 带有必需字段验证器的 AJAX 手风琴崩溃
- node.js - 如何优化firebase函数的响应速度
- ldap - 389 目录服务器创建vlv索引而不停止服务器?
- c++ - 未能优化看似明显的循环不变量(但 volatile 限定符确实有魔力)
- sql - 带有 NULL 的单个表结果的 SQL 子查询
- android - 关闭应用程序时,Internet Connection Changed Broadcast Receiver 未执行