Skip to content

Commit

Permalink
add comments to the plot function
Browse files Browse the repository at this point in the history
  • Loading branch information
byersiiasa committed Jul 10, 2024
1 parent 6187ea0 commit 1820d23
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rime/rime_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ def plot_maps_dashboard(
Continuous colormap from matplotlib.pyplot. The default is 'magma_r'.
shared_axes : boolean, optional
Whether zoom control automatically controls all axes. The default is True.
clim : # not implemented yet!
coastline : boolean, optional
Show the coastlines on the map using Cartopy features. The default is True.
crs : str, cartopy.Proj or pyproj.CRS, optional
Expand Down Expand Up @@ -873,26 +874,29 @@ def plot_maps_dashboard(
coastline=coastline,
crs=crs,
features=features,
# check / add clim or vmin/vmax here
)
plot_list = plot_list + [new_plot]

plot = hv.Layout(plot_list).cols(3)

# Mode 1 - one model-scenario, multiple indicators
if ("model" in ds.attrs.keys()) and ("scenario" in ds.attrs.keys()):
model = ds.attrs["model"]
scenario = ds.attrs["scenario"]
title_2 = f": {model}, {scenario}"

# Mode 2 - one indicator, multiple models/scenarios as the "variables"
else:
title_2 = f": {i}"
title_2 = f" {i}" # not sure if this works.


if isinstance(layout_title, type(str)) == False:
layout_title = f"Climate impacts in {year} {title_2}"
layout_title = f"Climate impacts in {year}: {title_2}"

plot.opts(title=layout_title)

# Plot - check filename
# Plot - check filename - update below for mode 1/2
if isinstance(filename, type(None)):
filename = f"maps_dashboard_{model}_{scenario}.html"

Expand Down

0 comments on commit 1820d23

Please sign in to comment.