MATLAB:更改已加载图形的线属性? [英] MATLAB: Changing the line properties of a loaded figure?

查看:130
本文介绍了MATLAB:更改已加载图形的线属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于MATLAB用户,我有一个非常简单的问题:

I've got a very simple question, for MATLAB users:

如果使用load命令加载图形文件(.fig),是否有任何方法可以从命令行更改绘图线属性? (宽度,颜色,标记等)

If I load a figure file (.fig) with the load command, is there any way to change the plotted lines properties from the command line? (width, color, marker, etc.)

PD:根据 定义线条颜色中的信息,前两个选项用于绘图 在此页面上…… 仅在使用plot命令时有效.显然,如果您加载该图,它们将无用.

PD: The first two options according to the information in Defining the Color of Lines for Plotting On this page… only work if you use the plot command. Apparently they are useless if you load the figure.

推荐答案

您可以使用然后,您可以为所有线对象更改一些属性:

Then you can change some property for all the line objects:

set(hline,'LineWidth',3)

或仅针对其中一些:

set(hline(1),'LineWidth',3) 
set(hline(2:3),'LineStyle',':') 
idx = [4 5];
set(hline(idx),'Marker','*') 

这篇关于MATLAB:更改已加载图形的线属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆