using small images over the figure plotted by plot() or scatter() function as a marker
이전 댓글 표시
Hi all, I need to plot a figure such that in the graph I have my own images in place of the custom markers provided from the Matlab.
so basically I need something like this ...
k = [1 2 3; 1 2 3];
plot(k(1,:),k(2,:));
now matlab plots these three points in the graph with blue circles as the markers. I wish to replace these markers with my own images which I have in my workspace by the name say "mark".
Can anyone help me ???
Regards Abhishek
답변 (1개)
Walter Roberson
2011년 4월 19일
0 개 추천
There is no Mathworks provided option to do this for plots. You need to figure out where each of the markers should go, and you need to image() or imagesc() each of the marker images in to place, taking care to adjust the placement coordinates in order to scale the image to the proper size. You will likely also want to read the documentation for the zoom() function and set up an ActionPostCallback to re-size the images when the zoom level changes -- normal plot markers are a constant size, but image() or imagesc()'d markers get zoomed in or out with the zoom, causing them to take over the display...
카테고리
도움말 센터 및 File Exchange에서 Data Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!