@@ -87,7 +87,7 @@ def find_difference_relative_to_comparison(_ser: pd.Series,
87
87
.drop (columns = ([comparison ] if drop_comparison else [])) \
88
88
.stack ()
89
89
90
- def do_bar_plot_with_ci (_df , annotations = None , xticklabels_horizontal_and_wrapped = False ):
90
+ def do_bar_plot_with_ci (_df , annotations = None , xticklabels_horizontal_and_wrapped = False , circles = False ):
91
91
"""Make a vertical bar plot for each row of _df, using the columns to identify the height of the bar and the
92
92
extent of the error bar."""
93
93
yerr = np .array ([
@@ -102,11 +102,14 @@ def do_bar_plot_with_ci(_df, annotations=None, xticklabels_horizontal_and_wrappe
102
102
xticks .keys (),
103
103
_df ['mean' ].values ,
104
104
yerr = yerr ,
105
- alpha = 0.5 ,
105
+ alpha = 0.5 if not circles else 0.0 ,
106
106
ecolor = 'black' ,
107
107
capsize = 10 ,
108
108
label = xticks .values ()
109
109
)
110
+ if circles :
111
+ ax .plot (xticks .keys (), _df ['mean' ].values , marker = 'o' , color = 'black' , markersize = 10 , linestyle = '' )
112
+
110
113
if annotations :
111
114
for xpos , ypos , text in zip (xticks .keys (), _df ['upper' ].values , annotations ):
112
115
ax .text (xpos , ypos * 1.05 , text , horizontalalignment = 'center' )
@@ -316,6 +319,7 @@ def rename_scenarios_in_index(ser: pd.Series) -> pd.Series:
316
319
for _ , row in pc_dalys_averted .clip (lower = 0.0 ).iterrows ()
317
320
],
318
321
xticklabels_horizontal_and_wrapped = True ,
322
+ circles = True ,
319
323
)
320
324
ax .set_title (name_of_plot )
321
325
ax .set_ylim (0 , 16 )
0 commit comments