File Exchange

image thumbnail

mPlot - Enhanced Plotting Engine

version (5.28 KB) by Erik Lee
Enhanced plotting engine that extends the basic plotting functionality delivered with Matlab.


Updated 22 Jan 2011

View Version History

View License

mPlot is an enhanced plotting engine that extends the basic plotting functionality delivered with Matlab. The purpose of mPlot is to consolidate daily plotting and formatting tasks into a single, easy-to-use object. Provided within the class are both high-level and low-level functionality. The class has 10 predefined, unique line visual settings. These can be cycled through in order to compare multiple data sets on a given plot while maintaining unique visual properties for each data set.

The class methods are layered in such a way that inheritance can be employed to build on top of the mPlot class. This allows one to extend mPlot’s functionality while leveraging the provided code. This also means one can easily redefine all of the line colors, as demonstrated at

A series of tutorials detailing the construction of the mPlot class as well as examples implementing an mPlot object can be found at

*Note: The Matlab class syntax used for mPlot is only supported in Matlab 2008a and later.

% Example 1 - Test 5 colors
m = mPlot(); %instantiate mPlot object
m.isAutoIncrementing = 1; % enable auto-incrementing through visual line styles
m.setGlobalMarkerSize(8); %increase marker size
for i=1:5 %loop through and plot
axis tight;
title('Example 1 - Test 5 colors');

Cite As

Erik Lee (2021). mPlot - Enhanced Plotting Engine (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)



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

Community Treasure Hunt

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

Start Hunting!