nav-left cat-right
cat-right

pcolor and contour plot with different colormaps

Matlab does not allow to combine use more than one colormap in a figure. However there are some possibilities to get around this problem, which are presented in this article. Initialization and export of figure For all plots the same initialization for the data and the figure is used: % clear command window, figures and all variables clc; clf; clear all;   %% Common variables   FontSize = 12; FontName =...

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  ...