File Exchange

image thumbnail

Custom Marker Plot

version (9.54 KB) by Salman Mashayekh
This simple code enables you to plot using custom markers.


Updated 17 Dec 2012

View License

This simple code enables you to plot using custom markers. It uses custom patches instead of Matlab built-in markers.

As the input, you need to provide x and y for the data points, like you do in regular plots. You also need to provide x and y data for your custom marker, assuming the center of the marker is at (0,0). You need to also provide the scale for your marker, which is analogous to Matlab's marker size.

Cite As

Salman Mashayekh (2020). Custom Marker Plot (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)

Stella Uiterwaal

Hamidreza Mirtaheri

Mohamed Gawad


Great patch really works well on R2015b, but adding the feature to remove the dashed line in an updated version will be nice.

Hamidreza Mirtaheri

Could it be used as a node marker in a graph, having the same properties like NodeLabel, MarkerSize and etc.?

Chhavi Yadav

can i put an image instead of the cross sign?

I want to move the image of a car on a road that is basically made using the plot and fill commands.

Andrew Tan

@Royi Anital, you can get the demo to work by setting rHex = 1.

Andrew Tan


Royi Avital

I tried running the demo and I get an error - "Undefined function or variable 'rHex'.". Any idea?


Great time saver, thank you for the submission!

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux