No BSD License  

Highlights from
marker

2.0

2.0 | 2 ratings Rate this file 6 Downloads (last 30 days) File Size: 5.18 KB File ID: #3774

marker

by Rasmus Anthin

 

22 Jul 2003 (Updated 24 Jul 2003)

Create a customized marker with a fixed size.

| Watch this File

File Information
Description

ยป help marker

MARKER Creates a user defined marker.

H = MARKER(X,Y,CDATA[,CMAP[,SIZE[,HALIGN[,VALIGN]]]]) creates a user defined marker CDATA (integer matrix) with colormap CMAP where each integer in CDATA corresponds to a color in CMAP (increasing order). SIZE is the marker size in points. If CDATA is not a square matrix, then the marker's shortest side will be streched so that both its width and height equals SIZE (SIZE defaults to 6).

If CMAP is omitted, its colormap will default to b/w. Furthermore, CMAP must have exactly as many rows as the number of different integers in CDATA.

MARKER does not yet support transparency.

HALIGN is the horizontal alignment and can be either of the following:

'left'
'center' (default)
'right'

VALIGN is the vertical alignment and can be either of the following:

'top'
'middle' (default)
'bottom'

Example:
cross=[0 0 2 1 2 0 0
0 0 0 1 0 0 0
2 0 0 1 0 0 2
1 1 1 2 1 1 1
2 0 0 1 0 0 2
0 0 0 1 0 0 0
0 0 2 1 2 0 0];
cmap=[1 1 1;0 0 1;1 0 1];
marker(.5,.5,cross,cmap,6,'cen','bot')
axis([0 1 0 1])

See also PLOT, GET, SET.

%%%%%%%

do the above example and try resizing the figure and you'll see that the shape and size of the marker is intact.

MATLAB release MATLAB 5.2 (R10)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
14 Mar 2004 Homayoun Jamshidi

How can I specify a marker (like Legend) on a image with desire figure and position?

22 Apr 2004 Ariel Greenberg

I would like to know this as well. The Marker property for line objects has no option for third party markers (at least this option isn't documented in R13).

28 Aug 2007 prasad shirvalkar

This doesn't create a marker that one can utilize in 'plot' or 'stairs' or other commands. It simply displays a small matrix at a specified position with constant scale. Not what it describes.

20 Aug 2008 martin korwel  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
specialized Rasmus Anthin 22 Oct 2008 07:05:17
plotting Rasmus Anthin 22 Oct 2008 07:05:17
marker Rasmus Anthin 22 Oct 2008 07:05:17
custom Rasmus Anthin 22 Oct 2008 07:05:17
plot Rasmus Anthin 22 Oct 2008 07:05:17
cdata Rasmus Anthin 22 Oct 2008 07:05:17
image Rasmus Anthin 22 Oct 2008 07:05:17
plot P K 17 Sep 2011 20:45:50

Contact us at files@mathworks.com