plot with user defined marker

조회 수: 3 (최근 30일)
peter
peter 2011년 1월 25일
how can I generate plot with user defined marker, e.g. numeric as marker.

채택된 답변

Paulo Silva
Paulo Silva 2011년 1월 25일
text(x,y,num2str(n)) %just the number n close to x y
text(x,y,strcat('\leftarrow',num2str(n))) %with arrow pointing to point
Make n equal to the numeric value you want before that code ex: n=69

추가 답변 (1개)

Walter Roberson
Walter Roberson 2011년 1월 25일
There is no way to create user-defined markers for the plotting routines.
You can use text() to place arbitrary text at arbitrary locations, or you can line() or plot() or even image() shapes at arbitrary locations.
Anything you put in to place by one of the above means will not automatically resize if you zoom the plot. In order to handle that condition, you need to create a zoom-mode object and establish a post-action callback that determines the new zoom level and removes the old markers and puts in new ones at an appropriate size for that zoom.
  댓글 수: 2
Paulo Silva
Paulo Silva 2011년 1월 25일
sorry walter, I started my answer and did some tests before you posted to make sure the code was correct :) I'm glad you posted first with more info.
peter
peter 2011년 1월 26일
thanks a lot

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

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by