Skip to content

Commit

Permalink
added legend title
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu-str committed Jan 17, 2025
1 parent c5ecd65 commit dc8966f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mescal/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def plot_indicators_of_technologies_for_one_impact_category(
trace.showlegend = False # Hide legend for the second subplot
fig.add_trace(trace, row=1, col=2)

fig.update_layout(barmode='stack', showlegend=True)
fig.update_layout(barmode='stack', showlegend=True, legend_title_text='Impact categories')

else:
# Add bar chart for operation
Expand Down Expand Up @@ -260,7 +260,7 @@ def plot_indicators_of_resources_for_one_impact_category(
))

fig = go.Figure(data=data)
fig.update_layout(barmode='stack', showlegend=True)
fig.update_layout(barmode='stack', showlegend=True, legend_title_text='Impact categories')

else:
df = R[(R['Name'].isin(resources_list)) & (R['Impact_category'] == str(impact_category))]
Expand Down

0 comments on commit dc8966f

Please sign in to comment.