Skip to content

Commit

Permalink
Fix generation_show option issue
Browse files Browse the repository at this point in the history
  • Loading branch information
theodoreln committed Jan 17, 2025
1 parent 73f44e5 commit 893f728
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pybalmorel/plotting/maps_balmorel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,8 +1269,11 @@ def find_nearest(array, value):
### 3.5.2 Legend with lines

# Get the bounding box of the first legend
bbox_second_legend = second_legend.get_window_extent().transformed(ax.transAxes.inverted())
pos_line = (bbox_second_legend.x0, bbox_second_legend.y0 - 0.0) # Adjust the vertical position as needed
try :
bbox_second_legend = second_legend.get_window_extent().transformed(ax.transAxes.inverted())
pos_line = (bbox_second_legend.x0, bbox_second_legend.y0) # Adjust the vertical position as needed
except :
pos_line = (0, 1)

if commodity == 'Electricity':
subs = 'el'
Expand Down

0 comments on commit 893f728

Please sign in to comment.