Closed mlotinga closed 1 month ago
Upgrading to pandas==1.5.3
does nothing - same errors raised.
Upgrading to pandas==2.0
does something, but raises new errors:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[1], line 12
8 iris_dabest = dabest.load(data=iris, x="species", y="petal_width",
9 idx=("setosa", "versicolor", "virginica"))
11 # Produce a Cumming estimation plot.
---> 12 iris_dabest.mean_diff.plot()
File [~\lib\site-packages\dabest\_effsize_objects.py:1195, in EffectSizeDataFrame.plot(self, color_col, raw_marker_size, es_marker_size, swarm_label, contrast_label, delta2_label, swarm_ylim, contrast_ylim, delta2_ylim, swarm_side, custom_palette, swarm_desat, halfviolin_desat, halfviolin_alpha, face_color, bar_label, bar_desat, bar_width, bar_ylim, ci, ci_type, err_color, float_contrast, show_pairs, show_delta2, show_mini_meta, group_summaries, group_summaries_offset, fig_size, dpi, ax, contrast_show_es, es_sf, es_fontsize, contrast_show_deltas, gridkey_rows, gridkey_merge_pairs, gridkey_show_Ns, gridkey_show_es, swarmplot_kwargs, barplot_kwargs, violinplot_kwargs, slopegraph_kwargs, sankey_kwargs, reflines_kwargs, group_summary_kwargs, legend_kwargs, title, fontsize_title, fontsize_rawxlabel, fontsize_rawylabel, fontsize_contrastxlabel, fontsize_contrastylabel, fontsize_delta2label)
1192 all_kwargs = locals()
1193 del all_kwargs["self"]
-> 1195 out = effectsize_df_plotter(self, **all_kwargs)
1197 return out
File [~\lib\site-packages\dabest\plotter.py:302, in effectsize_df_plotter(effectsize_df, **plot_kwargs)
300 if custom_pal is None and color_col is None:
301 swarm_colors = [sns.desaturate(c, swarm_desat) for c in unsat_colors]
--> 302 plot_palette_raw = dict(zip(names.categories, swarm_colors))
304 bar_color = [sns.desaturate(c, bar_desat) for c in unsat_colors]
305 plot_palette_bar = dict(zip(names.categories, bar_color))
AttributeError: 'numpy.ndarray' object has no attribute 'categories'
Upgrading numpy==1.26.4 seaborn==0.13.0 scipy==1.10.0
(required for intra-compatability) does nothing to address the above numpy.ndarray AttributeError
This seems to be specific to setting up an environment using venv and pip: using conda to set up the environment using the quoted dependency versions makes it work ok.
Hi @mlotinga , thanks for raising this issue. The "truncated" plot you generated is the new feature we introduced in the latest version of dabest, which is the asymmetric swarm plot.
We are glad that the problem got resolved.
Describe the bug
The current release version 2024.03.29 raises multiple errors running the basic usage README example when installed with dependencies listed in https://github.com/ACCLAB/DABEST-python/blob/master/nbs/01-getting_started.ipynb
Perhaps that dependencies list is out of date?
To Reproduce
Create venv environment:
python==3.10.0 numpy==1.23.5 scipy==1.9.3 matplotlib==3.6.3 pandas==1.5.0 seaborn==0.12.2 lqrt==0.3.3 dabest jupyter jupyterlab
Run
raises errors:
and produces truncated data plot
Expected behavior
Output visualisation shown in https://github.com/ACCLAB/DABEST-python/blob/master/iris.png
Screenshots
Your package version (please complete the following information):
Additional context