Skip to contents

This function creates a bar plot from a data frame with custom colors based on category names. Categories containing "loss", "recovery", or "stable" are colored salmon, lightgreen, or lightblue, respectively. All other categories are colored grey.

Usage

plot_bar_trajectory(df)

Arguments

df

A data frame containing the data to plot. The first column should be the categories and the second column should be the numeric values.

Value

A ggplot2 object representing the bar plot.

Examples

if (FALSE) {
plot_bar_trajectory(table_traj_area)
}