필터 지우기
필터 지우기

Create plot with specified handle?

조회 수: 16 (최근 30일)
J
J 2011년 5월 10일
I want to create a plot with the handle 32. Is there any way to do that?
  댓글 수: 2
Patrick Kalita
Patrick Kalita 2011년 5월 10일
As others have mentioned, the answer is no. But, can I ask why you would want to do that?
Matt Fig
Matt Fig 2011년 5월 10일
If you explain why you would want to do this, we could possibly suggest an alternative approach.

댓글을 달려면 로그인하십시오.

채택된 답변

Teja Muppirala
Teja Muppirala 2011년 5월 10일
No. But you can specify a "tag" of "32", and then use that to refer to the object using FINDOBJ.
For example:
figure
hold all;
h1 = plot(rand(1,5))
h2 = plot([1 -1 -1 1 -1])
set(h2,'tag','32');
AAA = findobj('tag','32')
set(AAA, 'linewidth',20)

추가 답변 (2개)

Walter Roberson
Walter Roberson 2011년 5월 10일
What is meant by a "plot" in this case? You can create a figure with the number 32 just by using figure(32) but you cannot control the exact numbers of any lower level graphics object.

Andrew Newell
Andrew Newell 2011년 5월 10일
I doubt it. If you could create one plot with handle 32, you could create another, and then it wouldn't be unique any more. This could lead to some serious bugs.
MATLAB seems to choose very particular values for handles. On my machine, the first plot of a session is 174.00xx for some value of xx (this seems to vary). Then each new handle is incremented by 0.0006.

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by