plotdynamics
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 (2024). plotdynamics (https://www.mathworks.com/matlabcentral/fileexchange/70546-plotdynamics), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Mathematics > Numerical Integration and Differential Equations > Ordinary Differential Equations >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |