nav-left cat-right
cat-right

pcolor plots with publication ready formating

Matlab has many possibilities to create plots even fancy ones. However its defaults are very seldom suitable to use the plots directly for a publication. The following minimal code demonstrates how to generate a pcolor plot for 2D data with x- and y-axis. The data was calculated using the function shown here. pcolor(xAxis, yAxis, Data2D); shading flat; % do not interpolate pixels colorbar % add colorbar  ...

plotting a filled curve

A search on how to fill the area under a curve reveals that such questions are quite often asked. Here is the solution in a function file that I created for simplifying filled curve plots using matlabs fill function. function handle = filledcurve(x, y, zero, colorspec)   if (nargin < 3) zero = 0; end   if (nargin < 4) colorspec = 'b'; end     xtemp = [x(1) ;...