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

Réponses (1)

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...

Catégories

En savoir plus sur Data Exploration dans Centre d'aide et File Exchange

Question posée :

le 19 Avr 2011

Community Treasure Hunt

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

Start Hunting!

Translated by