Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse Search

Direc­tory tex-archive/graphics/metapost/contrib/macros/matlab

matlab.mp ------- Metapost data plotting in matlab style

Yang Yang yangyang@juggler.ucsd.edu

March 3 2005


Matlab has powerful data plotting ability, but one annoying problem
prevents it from being perfect: when you increase the linewidth, the
dotted line size stays the same, so the plotted line no longer looks
like a dotted line.

another problem is matlab bug: it oftern cuts away some curves and
captions.

plus, matlab is expensive. on the other hand, the free gnuplot also
doesn't produce very satisfactory visual effects.


I got accustomed to matlab's easy interface. so I want to integerate
the powerful graphic function of Metapost and the easy interface of
Matlab. so I wrote this script matlab.mp. this is based on graph.mp, I
just collected the data into 2-D arrays, and remembered the line
styles, so it's easy to plot out legends.

FEATURES:
all kinds of line color, width, style (dotted/dashed, etc), and
markers. you can easily expand this by modifying the code.

easy interface. very similar to matlab

full power of latex in caption/legends, by using the latexmp package.




Files

Name Size Date Notes
Makefile 406 2005-03-07 01:00
README 1099 2005-03-07 01:00
example.mp 533 2005-03-08 01:00
latexmp.mp 15848 2005-04-07 01:00
lstmp.tex 4108 2005-03-07 01:00
matlab.mp 9519 2005-03-08 01:00
matlab.tex 5335 2005-03-08 01:00
sample_data 266 2005-03-08 01:00
simple.mp 700 2005-03-08 01:00
user_guide.pdf 56024 2005-03-08 01:00

Down­load the con­tents of this pack­age in one zip archive (51.0k).

meta­post-mat­lab – data plot­ting in Mat­lab style

Mat­lab has pow­er­ful data plot­ting abil­ity, but one an­noy­ing prob­lem pre­vents it from be­ing per­fect: when you in­crease the linewidth, the dot­ted line size stays the same, so the plot­ted line no longer looks like a dot­ted line.

Another prob­lem is Mat­lab's bugs: it of­ten cuts away some curves and cap­tions. And, of course, Mat­lab is ex­pen­sive. On the other hand, the free Gnu­plot doesn't pro­duce very sat­is­fac­tory vi­sual ef­fects ei­ther.

The au­thor got ac­cus­tomed to Mat­lab's easy in­ter­face, and wanted to in­te­gerate the pow­er­ful graphic func­tions of with the in­ter­face of Mat­lab. The out­come was mat­lab.mp. It is based on graph.mp (part of the dis­tri­bu­tion). The pack­age col­lects data into 2D ar­rays, and re­mem­bers the line styles, so it's easy to plot out leg­ends. The pack­age fea­tures:

– All kinds of line colour, width, style (dot­ted/dashed, etc), and mark­ers (the code may eas­ily be ex­panded);
– Easy in­ter­face, very sim­i­lar to Mat­lab;
– The full power of la­tex is avail­able in cap­tions and leg­ends, by us­ing the la­texmp pack­age.

Pack­age De­tailsmeta­post-mat­lab
Li­censeThe LaTeX Project Public Li­cense
Main­tainerYang Yang
Topics plot data
See also metapost
latexMP
Guest Book Sitemap Contact