File Exchange

image thumbnail

plotdynamics

version 1.0.0 (2.89 KB) by Francisco de Castro
Plots the columns of an array vs. time. Designed mostly to plot nicely the output of ode solvers.

33 Downloads

Updated 12 Mar 2019

View License

PLOTDYNAMICS plots the columns of an array vs. time
Designed mostly to plot nicely the output of ODE solvers, particularly for ecological questions, but general in design.
Each column of array 'b' is plotted vs. time 't'. The number of rows of 'b' must be the same as the number of elements of 't'. Grouping can be specified as optional argument. If groups are specified all the columns of the same group will have the same color. Otherwise each column will be plotted in a different color. Time units are assumed to be DAYS. 'b' can be in any unit, but default is g/m^2 (see below to change the label).

Optional arguments:
plotdynamics(t,b,'group',gnames) names of each GROUP in cell array 'gnames'
plotdynamics(t,b,'name',snames) names of each COLUMN in cell array 'snames'. The name will be plotted next to
the maximum value of the series.
plotdynamics(t,b,'year1',y) first year in the x axis (e.g. 1973). Default: 0
plotdynamics(t,b,'marker',s) uses marker 's' for lines/markers (e.g. ':*').
plotdynamics(t,b,'fclear','on') clears figure before ploting. Default 'on'
plotdynamics(t,b,'ytitle',text) uses 'text' for Y axis title. Default 'Biomass (g m^-2)'

Uses function 'brewermap' from Matlab FEX for colors if present.

Cite As

Francisco de Castro (2021). plotdynamics (https://www.mathworks.com/matlabcentral/fileexchange/70546-plotdynamics), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018b
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!