3.0

3.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 5.28 KB File ID: #30073
image thumbnail

mPlot - Enhanced Plotting Engine

by Erik Lee

 

17 Jan 2011 (Updated 22 Jan 2011)

Enhanced plotting engine that extends the basic plotting functionality delivered with Matlab.

| Watch this File

File Information
Description

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 http://matlabmafia.com/?p=104

A series of tutorials detailing the construction of the mPlot class as well as examples implementing an mPlot object can be found at http://matlabmafia.com/?p=21

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

------------------------------
%Example
% Example 1 - Test 5 colors
figure;
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
   m.plot((1:5)',randn(5,1));
end
axis tight;
title('Example 1 - Test 5 colors');

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File  
Everyone's Tags
data visualization(2), objectoriented programming, oop, plotting, unique line colors
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
29 Jan 2011 Matthew

meh

Updates
18 Jan 2011

Corrected links to point to the correct website and blog posts.

19 Jan 2011

Corrected constructor in order to initialize isAutoIncrementingPreviousState property

22 Jan 2011

1) Corrected setMarkerSize method. 2) Added methods to alter color scheme based on Matlab defined colormaps.

Contact us