필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Simplfying Line Plot Command

조회 수: 2 (최근 30일)
Michael
Michael 2014년 3월 11일
마감: MATLAB Answer Bot 2021년 8월 20일
Is there any way to accomplish this:
plot(largebinsmesh, guessCurve,'k-','linewidth',3.0);
plot(largebinsmesh, guessCurve,'w-.','linewidth',1.2);
in one line with plot?

답변 (1개)

Walter Roberson
Walter Roberson 2014년 3월 11일
No. The closest you could get would be,
h = plot(largebinsmesh, guessCurve, 'k-', largebinsmesh, guessCurve,'w-.','linewidth',1.2);
set(h(1), 'linewidth', 3.0);
This presumes that guessCurve is a vector; if it is a 2D array then it would be h(1:size(largebinmesh,2)) that would have to be set()
plot() accepts multiple string specifiers for the plotspec but it does not accept multiple parameter value pairs for the same parameter name.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by