Line Plots

Line Plots#

This section shows how to plot line graphs for 1-year and 3-year smoothed water supply time series using matplotlib.

# Load data (assumes CRWS and CRWS_3yr already computed)
plt.plot(df["Year"], df["CRWS"], label="CRWS (1-Year)", color="steelblue", linewidth=2)
plt.plot(df["Year"], df["CRWS_3yr"], label="CRWS (3-Year)", color="firebrick", linewidth=2)
plt.axhline(0, linestyle="--", color="black")
plt.legend()
plt.title("CRWS Time Series")
plt.xlabel("Year")
plt.ylabel("Water Supply [MAF]")
plt.show()