在MatLab中,如何调整函数"gplot"绘制的线宽? [英] In MatLab, how to adjust the line width drawn by the function 'gplot'?
本文介绍了在MatLab中,如何调整函数"gplot"绘制的线宽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
正如Matlab的帮助文档所述,我们可以将gplot
用作
As the help document of Matlab saying, we can use gplot
in such a form as
gplot(A,Coordinates,LineSpec)
但是当我尝试修改该行的linewidth
并使用类似
But when I try to modify the linewidth
of the line and use a code like
gplot(A,Coordinates,'linewidth',2)
发生错误,错误信息显示Error using gplot:
Too many input arguments.
an error occurred and the error information saying that Error using gplot:
Too many input arguments.
我想知道他们的代码是否有问题.
I was wondering if their is anything wrong with my code.
推荐答案
基于PearsonArtPhoto的答案,如果使用findall(gcf,'type','line')
明确找到了这些行,则可以对其进行修改.
Building on the answer of PearsonArtPhoto, the lines can be modified if they are explicitly found using findall(gcf,'type','line')
.
这是一个有效的示例:
k = 1:30;
[B,XY] = bucky;
gplot(B(k,k),XY(k,:),'-*')
set(findall(gcf,'type','line'),'LineWidth',5)
axis square
产生下图
这篇关于在MatLab中,如何调整函数"gplot"绘制的线宽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文