I've got a very simple question, for MATLAB users:
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: 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.
Typing Ctrl+C when a modal figure has focus causes that figure to revert to a 'normal' WindowStyle property setting. This allows the user to type at the command line. Figures with the WindowStyle property set to 'modal' and the Visible property set to 'off' do not behave modally until MATLAB makes them visible.
Choose the Edit Plot option on the figure window Tools menu. Click on the selection button in the figure window toolbar. Choose an option from the Edit or Insert menu. For example, if you choose the Axes Properties option on the Edit menu, MATLAB activates plot edit mode and the axes appear selected.
set(graph1,'LineWidth',2); fplot(x1,[0,2],'k');
You can get handles for all line objects on current figure with FINDOBJ function:
hline = findobj(gcf, 'type', 'line');
Then you can change some property for all the line objects:
set(hline,'LineWidth',3)
or just for some of them :
set(hline(1),'LineWidth',3)
set(hline(2:3),'LineStyle',':')
idx = [4 5];
set(hline(idx),'Marker','*')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With