Skip to content

Commit

Permalink
use 1 decimal in color bar
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosEpia committed Jul 17, 2023
1 parent 2a566a7 commit 6999e9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions etrago/tools/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2776,12 +2776,12 @@ def plot_grid(
# Set fixed boundaries if selected in parameters
if not boundaries:
boundaries = [
min(line_colors.min(), link_colors.min()),
max(line_colors.max(), link_colors.max()),
min(round(line_colors.min(),1), round(link_colors.min(),1)),
max(round(line_colors.max()), round(link_colors.max())),
]

# Create ticks for legend
v = np.linspace(boundaries[0], boundaries[1], 101)
v = [round(x,1) for x in np.linspace(boundaries[0], boundaries[1], 101)]
for l_collection in ll:
l_collection.set_clim(boundaries[0], boundaries[1])

Expand Down

0 comments on commit 6999e9c

Please sign in to comment.