Figure settings
조회 수: 2 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (4개)
Jan
2011년 5월 27일
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.
댓글 수: 0
Clemens
2011년 5월 27일
I wrote http://www.mathworks.com/matlabcentral/fileexchange/31477-fixes-to-print-huge-plots-as-png to solve a similar problem for me.
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).
댓글 수: 0
Matt Fig
2011년 5월 25일
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:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!