는 대답을 @yuk하려면 (또는 보다 정확하게는 lines plotted + 2x lines in legend
). 나는 여기에 그려진 모든 라인이 또한 전설에있을 때만 볼 것입니다.
시퀀싱은 이상한 : 5 선 (우리가 1 to 5
그들을주의하자)는 플로팅 전설 당신이 솔루션 (금요일 저녁 늑장)로
hline:
1 : 5 th line (mistical)
2 : 5 th line (in legend)
3 : 4 th line (mistical)
4 : 4 th line (in legend)
5 : 3 th line (mistical)
6 : 3 th line (in legend)
7 : 2 th line (mistical)
8 : 2 th line (in legend)
9 : 1 th line (mistical)
10: 1 th line (in legend)
11: 5 th line (in plot)
12: 4 th line (in plot)
13: 3 th line (in plot)
14: 2 th line (in plot)
15: 1 th line (in plot)
이있을 것이다, 추가 내가 이것을 만든 경우 작은 아기 :
해결 방법 1 :이 전설이며, 얼마나 많은 린 경우는
가 감지 전설을 재설정하지 않는 경우 ES가 그려 각 라인에 대한
hline = findobj(gcf, 'type', 'line');
isThereLegend=(~isempty(findobj(gcf,'Type','axes','Tag','legend')))
if(isThereLegend)
nLines=length(hline)/3
else
nLines=length(hline)
end
오른쪽 핸들을 찾아 그 라인 (은 해당 전설 라인에도 적용됩니다)의 물건을 할
for iterLine=1:nLines
mInd=nLines-iterLine+1
if(isThereLegend)
set(hline([(mInd*2-1) (mInd*2) (2*nLines+mInd)]),'LineWidth',iterLine)
else
set(hline(mInd),'LineWidth',iterLine)
end
end
이은과 모든 i-th
라인을 만든다 width=i
여기에서 자동 속성 변경을 추가 할 수 있습니다.
해결 방법 2 : 전설을 재설정 줄 알아서, 그것을 간단한
는 전설 없애하십시오. 전설 일부 speciffic 장소 등
대단히 감사합니다! 그것은 잘 작동했습니다! – aarelovich