@@ -715,7 +715,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
715715 if bootstraps_color_by_group is False :
716716 legend_labels_unique = np .unique (legend_labels )
717717 unique_idx = np .unique (legend_labels , return_index = True )[1 ]
718- legend_handles_unique = (pd .Series (legend_handles ,dtype = 'float64' ).loc [unique_idx ]).tolist ()
718+ legend_handles_unique = (pd .Series (legend_handles , dtype = "object" ).loc [unique_idx ]).tolist ()
719719
720720 if len (legend_handles_unique ) > 0 :
721721 if float_contrast is True :
@@ -739,6 +739,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
739739 line .set_linewidth (3.0 )
740740
741741 og_ylim_raw = rawdata_axes .get_ylim ()
742+ og_xlim_raw = rawdata_axes .get_xlim ()
742743
743744 if float_contrast is True :
744745 # For Gardner-Altman plots only.
@@ -843,7 +844,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
843844 axx .hlines (diff ,
844845 effsize_line_start , xlimhigh ,
845846 ** reflines_kwargs )
846- rawdata_axes .set_xlim (- 0.5 , 1.5 ) # to aligh the axis
847+ rawdata_axes .set_xlim (og_xlim_raw ) # to aligh the axis
847848 # Despine appropriately.
848849 sns .despine (ax = rawdata_axes , bottom = True )
849850 sns .despine (ax = contrast_axes , left = True , right = False )
0 commit comments