Overview
Thenetgrossplot() function creates a stacked bar plot showing net and gross changes of land use and cover (LUC) categories during the entire analyzed time period. This visualization helps distinguish between total change (gross) and directional change (net gain or loss).
Function Signature
Parameters
A table of multi-step transitions (
lulc_Multistep) generated by contingencyTable().A table containing the LUC legend items and their respective colors (
tb_legend).The title of the plot. Use
NULL for no title.Label for the x-axis.
Label for the y-axis.
The title displayed in the legend.
Labels for the three types of changes. Must be a named vector with names
GC, NG, and NL.A named vector defining the three bar colors for gross change, net gain, and net loss.
If
TRUE, changes are computed in km²; if FALSE, in pixel counts.Return Value
Returns a ggplot2 bar plot object showing:- Wide gray bars representing gross change (total transitions in or out)
- Narrow colored bars representing net change (net gain or net loss)
- Horizontal line at zero separating gains from losses
- Bars grouped by land use category
Usage Examples
Basic Net/Gross Plot
Custom Colors and Labels
With Title and Custom Legend
Interpretation Guide
Understanding the Plot
-
Wide bars (Gross change): Total amount of change, regardless of direction
- Calculated as the sum of all gains + all losses for a category
- Always positive
- Indicates the overall dynamics of a category
-
Narrow bars (Net change): Directional change
- Above zero (Net gain): Category increased in area
- Below zero (Net loss): Category decreased in area
- Calculated as total gains minus total losses
- Horizontal line at zero: Reference line separating gains from losses
Example Interpretation
Categories with high gross change but low net change are experiencing significant spatial reorganization without major area change.
Saving the Plot
As a ggplot2 object, save usingggsave():
Advanced Customization
Using Pixel Counts
Adding ggplot2 Theme Elements
Since this returns a ggplot2 object, you can add additional customization:See Also
- barplotLand - Category areas over time
- Intensity Analysis - Detailed change analysis
- Visualization Guide - Complete visualization workflow