Figure settings

Hi, Plots in matlab dont look good for printing! Want an m-file with no inargument to change the linewidth for all lines in the plot.
I use: h = findobj(gcf,'Type','line') N = length(get(h,'Parent')) % N "lines"
But with use of legend it count allso the legend lines. How can I overcome this problem? Is there a better why to get a line? And how can I get all lines in a subplot?

Réponses (4)

Jan
Jan le 27 Mai 2011

2 votes

All lines in a subplot:
h = findobj(gcf, 'Type', 'line', 'Parent', SubPlotHandle)
The legend is usually connected to the data lines. So if you change the properties of the lines, the legend will automatically changes also.
Clemens
Clemens le 27 Mai 2011

1 vote

But it's very similar to your approach.
I find it easiest to set default values before plotting - like in the print_fixes.figure command. This should be also possible for axes (like subplots).
Matt Fig
Matt Fig le 25 Mai 2011

0 votes

This function lets you select the lines with the mouse and change the color, linewidth, marker, markersize, etc. Look at the preview image to see the menu that pops up when right-clicking on a line:

LINCMENU

hugo
hugo le 27 Mai 2011

0 votes

This file is a bit to fancy for me. It works great but I need to change a lot of figures (~30). Therefore I need a automatic file that do the changes!

Catégories

En savoir plus sur Graphics Object Properties dans Centre d'aide et File Exchange

Tags

Question posée :

le 25 Mai 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by