trevismd / statannotations Goto Github PK
View Code? Open in Web Editor NEWadd statistical significance annotations on seaborn plots. Further development of statannot, with bugfixes, new features, and a different API.
License: Other
add statistical significance annotations on seaborn plots. Further development of statannot, with bugfixes, new features, and a different API.
License: Other
There seems to have a great demand for it (webermarcolivier/statannot#54). Let's implement it.
Maybe this PR for statannot will still be useful (webermarcolivier/statannot#53)?
See https://stackoverflow.com/questions/67905649/python-seaborn-statistic-analysis-using-statannot-doesnt-look-right/67934656#67934656
Mostly to track/log progress, it is currently being implemented in branch v0.2.
Hey!
In my data processing, data in different pairs may have different distributions and I wanna use different statistical tests for different pairs, according to whether the data in a pair both conform to normal distribution or not.
So is there any way to solve this problem?
While having the loc=inside
option set, is it possible to show the annotations outside of the y-axis limit?
I tried to do that by changing the y limits after using statannotations, because else the axis limits are increased, causing the bars to shrink too much (see below).
Unfortunately, by changing the limits afterwards the brackets are not displayed anymore. Do you know what is causing that?
I posted this question/answer to statannot and have not had a chance to try it with statannotations. I'll see what I can do but below is the issue I had and the way to solve the problem. I wanted to add chi-squared tests. I'm new to trying to do a Pull Request and am assuming that the code would not work if I tried to make one. What would be the best route to go about doing so?
Here is the link to the previous closed issue:
webermarcolivier/statannot#65
Thanks!
Subject of https://stackoverflow.com/questions/72102651/sequence-item-0-expected-str-instance-numpy-int64-found
To fix it, we could cast the struct
label to string here.
statannotations/statannotations/Annotation.py
Lines 42 to 43 in bc0c4b8
Following up on that: It would be nice to have the option for additional annotations, since the framework to obtain the correct position is already in place. What I'm missing is a function to annotate each box with a small textbox, e.g. to add sample sizes to the boxes.
Originally posted by @jo-mueller in webermarcolivier/statannot#51 (comment)
See original issue in statannot
: webermarcolivier/statannot#78
This also reveals that the validation of provided parameters (even the recent implementation) must be made more robust.
Hi there,
currently, statannotations cannot support seaborn v0.12. There are some more new functions in seaborn v0.12, but I cannot use it due to the compatibility issue, which is not convenient. therefore, can I request an update of statannotations to get compatible with seaborn v0.12. This would be wonderful.
Thanks for your contribution to such a good package~
BR
As the title, is there a way to do the statistical comparison and plot the annotations between the groups specified via the hue?
Hi, after I defined the plot_and_annotate_facets function, there's one AttributeError: 'tuple' object has no attribute 'module' from g.map function. I found plot_and_annotate_facets is a tuple. Could you please tell me if I am using this function correctly or not? Thank you very much!
annot = Annotator(None, pairs)
plot_and_annotate_facets = annot.plot_and_annotate_facets(
plot='boxplot', plot_params=plot_params, configuration=configuration, annotation_func='set_custom_annotations', annotation_params=annotation_params, **kwargs)
g = sns.FacetGrid(
plot_df,
col="Cell type"
)
g.map(
plot_and_annotate_facets,
feature_name, # x
value_name, # y
)
In this graph, the annotations are supposed to go from pink (LN) to pink, but they only go from green (HN) to green and I can't figure out what's wrong. I've attached the image and the code I used for this particular graph below.
order = list(set(df['Genotype']))
order.sort()
pairs = [[('A3GK', 'LN'), ('COL', 'LN')], [('COL', 'LN'), ('GV5', 'LN')]]
hue_order = ['NN','HN','LN']
plot_params = {
'data': df,
'x': 'Genotype',
'y': 'PR_Length',
"order": order,
"hue": 'Condition'}
plot = sns.boxplot(**plot_params,hue_order = hue_order)
annotator = Annotator(plot, pairs, **plot_params)
annotator.configure(test='Mann-Whitney', verbose=1)
annotator.apply_test()
annotator.annotate()
sns.move_legend(plot, "upper left", bbox_to_anchor=(1, 1))
plt.show()
The rendering should be the same as the one you obtain when testing a column against itself (i.e. pairs=[('col1', 'col1')]
), but testing against a fixed population mean.
I think this can be done neatly by reusing the pairs
positional argument and introducing objects for representing the intended tests.
from statsannotations import Pair, Population
Annotator(ax, [Pair('col1', 'col2'), Population('col1', popmean=0, alternative='two-sided'), ('col2', 'col3')])
when using matplotlib SubFigures, this error is produced.
AttributeError: 'SubFigure' object has no attribute 'get_dpi'
avoiding subfigure is the only way to avoid that error
Thank you for the nice package. can we add a method to remove the lines that are not significant?
so if the pvalue is less than 0.05, the package remove the whole line
Hi!
I first appreciate your efforts to make this amazing python library for plotting.
I tried to use this tool to make some plots with annotations, but I encountered an issue that I couldn't fix.
Annotations do not align for multiple annotations.
Here is the image.
I tried to adjust the ylim, but it doesn't work.
Below is my code.
`plt.figure(figsize=(15,8))
ax = sns.boxplot(x=x,y=y, hue=hue,data=df,fliersize=0,saturation=0.7)
plt.legend(bbox_to_anchor=(1.02, 1), loc='upper left', borderaxespad=0)
annotator = Annotator(ax, pairs_all,x=x,y=y, hue=hue, data=df,verbose=False)
annotator.configure(text_format="star",loc='inside', verbose=False)
annotator.set_pvalues(p_values_all)
annotator.annotate()
ax.set_ylim(-950, -550)
plt.show()`
I tried to use several different hyperparameters, such as line_offset_to_group. The only way to make it works is to put annotations outside.
I would very appreciate if anyone could guide me.
Thank you!
Hi, thanks a lot for keeping up the good work! Just wondering if Chi2Indepence is implemented? If not, feel free to use my code:
https://github.com/JohannesWiesner/statplot/blob/master/statplot.py
Greetings,
Johannes
I'm unclear what the label * (ns) means, is this point significant or not? The adjusted p-value is < 0.05 so I'm unclear why the (ns) is there. Would be great if there's a way to remove this. Thanks!
It would be great if one could set a dynamic tail for a one-sided t-test. I.e. instead of having a static value
annotator.apply_test(alternative='greater')
one could input an array determining which tail should be evaluated for which pair combination.
In ecology study, we often apply LSD or Tukey multiple comparisons, which are vital when labeling a batch of significance of experimental result. Most of multiple comparisons methods have been integrated in statmodels.stats.multicomp. You may get more information of multiple comparisons methods from https://zhuanlan.zhihu.com/p/44880434.
Hi,
i'm using your very helpful package to annotate datasets that i store and plot using pandas data frame methods.
When adding stat annotation to data frame boxplot layout, the lines presents an offset on x.
To illustrate my problem i plotted the data first using the data frame method and then using seaborn library.
import seaborn as sns
from statannotations.Annotator` import Annotator
fig, axs = plt.subplots(1,2)
axs[0] = average_annual_adult_go.boxplot(ax=axs[0], grid=False)
annotator0 = Annotator(ax=axs[0], data=average_annual_adult_go, pairs=[("Initial state","Working phase")], order=["Initial state", "Working phase"])
annotator0.configure(test='t-test_welch', text_format='star', loc='outside')
annotator0.apply_and_annotate()
axs[1] = sns.boxplot(data=average_annual_adult_go)
annotator1 = Annotator(ax=axs[1], data=average_annual_adult_go, pairs=[("Initial state","Working phase")], order=["Initial state", "Working phase"])
annotator1.configure(test='t-test_welch', text_format='star', loc='outside')
annotator1.apply_and_annotate()
the result :
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
Initial state vs. Working phase: Welch's t-test independent samples, P_val:5.684e-272 t=3.485e+02
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
Initial state vs. Working phase: Welch's t-test independent samples, P_val:5.684e-272 t=3.485e+02
I am not sure if there are internal differences, but I often I use pointplot (instead of barplots) because they are less cluttered,
(pointplot might not be the right plot to use, but it is inspired in the seaborn gallery: https://seaborn.pydata.org/examples/jitter_stripplot.html. In any case, feel free to point out a better alternative)
Is it possible to add pointplot to the list of supported plots?
First reported here: webermarcolivier/statannot#80
When adding annotations with loc="outside"
, the figure size is not adjusted automatically, which requires an extra parameter to save or show the figure without it being cut short.
(Until fixed, use fig.tight_layout()
manually before saving/showing the plot)
Hi, thanks for the great package. What is the best convention for implementing new tests? I wrote a new test in the StatTest file, copying the wilcoxon example, however a new Annotator couldn't find the test, and raised an exception here. I (think I) got it to work by adding my new entry in IMPLEMENTED_TESTS
in the test file, but I was not sure if this is the intended usage, since I couldn't find documentation directing me to do so.
Happy to PR some documentation updates if you think it'd be useful.
Hi there,
currently, statannotations cannot support seaborn v0.12. There are some more new functions in seaborn v0.12, but I cannot use it due to the compatibility issue, which is not convenient. therefore, can I request an update of statannotations to get compatible with seaborn v0.12. This would be wonderful.
Thanks for your contribution to such a good package~
BR
I set ‘comparisons_correction=BH’, but the p-values report and annotate equal to the case ‘comparisons_correction=None’. Specifically, in the example notebook, section 'Multiple comparisons', for Mann-Whitney-Wilcoxon test two-sided with/without Benjamini-Hochberg correction, the reported and annotated p-values are equal.
Indeed, it seems, only comparisons_correction="Bonferroni" annotates and reports correctly.
The tests that are displayed are defined by what's fed into the argument pairs
of Annotator
but we don't know prior to running apply_and_annotate
what tests are significant. I don't think there's an easy way to eliminate from the list fed to pairs
the pairs
that are not significant.
Hi @mxposed
I will like to find out if there was a documentation for this tool? I would like to know if there is an option to limit annotations to only statistically significant comparisons
Thank you
I wonder if it would make sense to include a default option for the pair
argument in statannotations.Annotator.Annotator
? I guess a lot of users would simply like to obtain all pair-wise comparisons by default?
Hi, where can I find the code for producing the FacetGrid example here? It is the image example_2facts.png
stored in the usage/
folder in this repository. Thank you!
https://github.com/trevismd/statannotations/blob/master/usage/example_2facets.png
Hi there,
currently, statannotations cannot support seaborn v0.12. There are some more new functions in seaborn v0.12, but I cannot use it due to the compatibility issue, which is not convenient. therefore, can I request an update of statannotations to get compatible with seaborn v0.12. This would be wonderful.
Thanks for your contribution on such a good package~
BR
Hi,
Everything is in the title: how can we change annotation fontsize when using set_custom_annotation ?
This could intuitively straightforward, as they are very similar to boxplots... But, is it ?
It would be great if this package were available on conda. The only hurdle to this I think is merging #56
Hi,
When plotting a boxplot with hues, I have certain pairs and a list of pvalues, in which values are in the same order as pairs order. But, after plotting, the pairs are getting assigned with different pvalues, not following the assigned order. This problem only happens when I use set_custom_annotations but when using set_pvalues, the order of pairs and pvalues are okay. I am trying to understand why this is happening, does the pairs get sorted and then the pvalues are assigned to them? Any insights will be helpful.
Thanks
Is there any way not to show "ns" p_value in the picture?
Hey @trevismd
Right now Annotator does not work if any of the groups have only NaN values. Is there a way to perform a test between the other groups and ignore the group that has only NaN values?
In order to make it work I added zero values to the group that has only NaN values. I made it look like this:
Otherwise I get the following error when I try yo run the Annotator:
>>> Annotator(ax, pairs, data=df[['CONTROL_Edited', 'CONTROL_Not_Edited', 'AD_Edited', 'AD_Not_Edited']], order=order)
/media/kokyriakidis/RED/BCBIO/anaconda/envs/postprocessSPRINT/lib/python3.8/site-packages/seaborn/categorical.py:82: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead.
plot_data = [np.asarray(s, float) for k, s in iter_data]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/media/kokyriakidis/RED/BCBIO/anaconda/envs/postprocessSPRINT/lib/python3.8/site-packages/statannotations/Annotator.py", line 106, in __init__
self._plotter = self._get_plotter(engine, ax, pairs, plot, data,
File "/media/kokyriakidis/RED/BCBIO/anaconda/envs/postprocessSPRINT/lib/python3.8/site-packages/statannotations/Annotator.py", line 778, in _get_plotter
return engine_plotter(*args, **kwargs)
File "/media/kokyriakidis/RED/BCBIO/anaconda/envs/postprocessSPRINT/lib/python3.8/site-packages/statannotations/_Plotter.py", line 94, in __init__
self.value_maxes = self._generate_value_maxes()
File "/media/kokyriakidis/RED/BCBIO/anaconda/envs/postprocessSPRINT/lib/python3.8/site-packages/statannotations/_Plotter.py", line 215, in _generate_value_maxes
group_name, value_pos = self._get_value_pos(child, data_to_ax)
File "/media/kokyriakidis/RED/BCBIO/anaconda/envs/postprocessSPRINT/lib/python3.8/site-packages/statannotations/_Plotter.py", line 316, in _get_value_pos
return self._get_value_pos_for_path_collection(
File "/media/kokyriakidis/RED/BCBIO/anaconda/envs/postprocessSPRINT/lib/python3.8/site-packages/statannotations/_Plotter.py", line 332, in _get_value_pos_for_path_collection
group_pos = float(np.round(np.nanmean(
File "<__array_function__ internals>", line 180, in nanmean
File "/media/kokyriakidis/RED/BCBIO/anaconda/envs/postprocessSPRINT/lib/python3.8/site-packages/numpy/lib/nanfunctions.py", line 1048, in nanmean
avg = _divide_by_count(tot, cnt, out=out)
File "/media/kokyriakidis/RED/BCBIO/anaconda/envs/postprocessSPRINT/lib/python3.8/site-packages/numpy/lib/nanfunctions.py", line 215, in _divide_by_count
return np.divide(a, b, out=a, casting='unsafe')
ValueError: output array is read-only
Can I somehow have the CONTROL_Edited category be empty (have only NaN values) and make Annotator work?
https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.brunnermunzel.html
From scipy doc.
The Brunner-Munzel test is a nonparametric test of the null hypothesis that when values are taken one by one from each group, the probabilities of getting large values in both groups are equal. Unlike the Wilcoxon-Mann-Whitney’s U test, this does not require the assumption of equivariance of two groups. Note that this does not assume the distributions are same. This test works on two independent samples, which may have different sizes.
I think I might be doing something wrong here, but...
import seaborn as sns
from statannotations.Annotator import Annotator
iris = sns.load_dataset("iris")
iris = pd.melt(iris, "species", var_name="measurement")
pair_list = [(('sepal_length', 'setosa'),
('sepal_length', 'versicolor'),
('sepal_length', 'virginica')),
(('sepal_width', 'setosa'),
('sepal_width', 'versicolor'),
('sepal_width', 'virginica')),
(('petal_length', 'setosa'),
('petal_length', 'versicolor'),
('petal_length', 'virginica')),
(('petal_width', 'setosa'),
('petal_width', 'versicolor'),
('petal_width', 'virginica'))]
petal_ax = sns.pointplot(
data=iris, x="value", y="measurement", hue="species",
join=False, dodge=.8 - .8 / 3, palette="dark",
markers="d", scale=.75, errorbar=None
)
annotator = Annotator(ax=petal_ax,
pairs=pair_list,
data=iris,
y="measurement",
x="value",
hue="species",
order=['sepal_length', 'sepal_width', 'petal_length', 'petal_width'],
hue_order=['setosa', 'versicolor', 'virginica'])
annotator.configure(test='Mann-Whitney', text_format='star', loc='outside')
annotator.apply_and_annotate()
Returns
ValueError Traceback (most recent call last)
[c:\Users\systemses\Downloads\pyControl\running_analysis](file:///C:/Users/systemses/Downloads/pyControl/running_analysis)[rand].ipynb Cell 9 in 2
[3](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=2) pair_list = [(('sepal_length', 'setosa'),
[4](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=3) ('sepal_length', 'versicolor'),
[5](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=4) ('sepal_length', 'virginica')),
(...)
[13](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=12) ('petal_width', 'versicolor'),
[14](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=13) ('petal_width', 'virginica'))]
[15](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=14) petal_ax = sns.pointplot(
[16](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=15) data=iris, x="value", y="measurement", hue="species",
[17](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=16) join=False, dodge=.8 - .8 / 3, palette="dark",
[18](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=17) markers="d", scale=.75, errorbar=None
[19](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=18) )
---> [20](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=19) annotator = Annotator(ax=petal_ax,
[21](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=20) pairs=pair_list,
[22](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=21) data=iris,
[23](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=22) y="measurement",
[24](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=23) x="value",
[25](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=24) hue="species",
[26](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=25) order=['sepal_length', 'sepal_width', 'petal_length', 'petal_width'],
[27](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=26) hue_order=['setosa', 'versicolor', 'virginica'])
[28](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=27) annotator.configure(test='Mann-Whitney', text_format='star', loc='outside')
[29](vscode-notebook-cell:/c%3A/Users/systemses/Downloads/pyControl/running_analysis%5Brand%5D.ipynb#X42sZmlsZQ%3D%3D?line=28) annotator.apply_and_annotate()
...
---> 63 raise ValueError(f"Missing x value(s) "
64 f"`{render_collection(unmatched_in_order)}` in {x} "
65 f"(specified in `order`)")
ValueError: Missing x value(s) `"sepal_width", "petal_length", "sepal_length", "petal_width"` in value (specified in `order`)
Is there any possibility to export the statistical test results (p-value, etc) into variables or list? So far, I cannot find the way how to get the stat test besides the plotting and printing the values.
Hello,
Thank you for your work. I've created a nice catplot with different columns. But I cannot add statistics with Annotator as you did in your example 2facets.png How did you do ?
Thanks in advance,
Jessica
Is there support planned ?
Is it possible to make the current version work with catplot if I work with the FacetGrid that is returned from the sns.catplot ?
For example, maybe passing a function to g.map_dataframe and for each axis to do the annotations ?
Hi,
It seems likeadding custom (manual) p_values for box plot with hue is not possible. I cannot see an example of it anywhere and it would be very useful please! Thanks!
I guess it would look something like:
p_values = [0.1, 0.2, 0.001]
annot = Annotator(ax = ax, pairs = pairs, x = "Age", hue = "Sex", y = "value")
annot.new_plot(data = data)
annot.configure(loc='outside', test = None).set_pvalues(p_values)
Hello, I don't want to show "ns" in the plot, can I use any paramater to hide "ns"? Juts showing "*" is fit for me. Thanks!
I noticed that the implementation of the Kruskal-Wallis test is somewhat different from what is typically seen in literature (at least in my field).
Statannotations applies a pairwise test on different groups (note that it is not a paired test which is shown in the printed output). Commonly the Kruskal-Wallis test is done on all groups to check if there is any difference and then which differences there are is picked up with a Posthoc Dunn test. I wrote some code earlier today with a Python implementation, this can be found here, note the difference in the results.
Is there an interest to implement some of these Posthoc tests? Scikit-posthocs has the stats needed. At first glance this can likely be added to Annotator._get_results or by creating a PosthocAnnotator class that does something along the lines of my code and pipes that into the Annotator. I could give that a shot if there is sufficient interest.
Hello,
thanks for the package it's great!
I am trying to annotate a boxplot where I want to break the y axis into two but I cannot see the annotation of the data in the bottom part (ax2 subplot)
Here is the code:
from statannotations.Annotator import Annotator
df_samples_media = df_samples.loc[(df_samples["Sample"].str.contains("LPS"))]
assays_list = (df_samples_media["Assay"].unique())
pairs2=[[("CCL8", "WT"),("CCL8", "HOM")] , [("CCL13", "WT"), ("CCL13", "HOM")]]
pairs=[[("CCL2", "WT"),("CCL2", "HOM")]]
hue_parameters= {'data': df_samples_media,
'x': 'Assay',
'y': 'Conc',
"hue": "PTK2B_genotype",
}
fig, (ax, ax2) = plt.subplots(ncols=1, nrows=2, sharex=True)
ax=sns.boxplot(**hue_parameters, ax=ax)
annotator = Annotator(ax, pairs, **hue_parameters)
annotator.configure(test='t-test_ind', text_format='star', loc="inside")
annotator.apply_and_annotate()
ax2=sns.boxplot(**hue_parameters, ax=ax2)
annotator2 = Annotator(ax2, pairs2, **hue_parameters)
annotator2.configure(test='t-test_ind', text_format='star',loc="inside")
annotator2.apply_and_annotate()
ax.set_ylim(500000, 2000000) # outliers only
ax2.set_ylim(0, 90000)
ax2.get_legend().remove()
ax.spines['bottom'].set_visible(False)
ax2.spines['top'].set_visible(False)
ax.xaxis.tick_top()
ax.tick_params(labeltop=False) # don't put tick labels at the top
ax2.xaxis.tick_bottom()
ax.set_ylabel("")
ax.set_xlabel("")
ax2.set_ylabel("")
#adjust distance between subplots
fig.subplots_adjust(hspace=0.5)
fig.text(0.07, 0.5, 'Concentration (pg/ml)', va='center', rotation='vertical')
do you know how I could do that? Is there a way to control the distance of the annotations to the boxplots?
Thanks a lot,
Erica
![plate3_LPS_stats](https
://user-images.githubusercontent.com/26386285/152211212-ba5350fe-c839-43af-8b43-fb929d5b4c6d.jpeg)
a
Hello thank you for this updated version of statannot it's been very useful. I am currently having an issue with non-bonferroni multiple comparisons corrections; they seem to give me two significances like this (with the holms-bonferroni; the "* (ns)" label is what seems strange to me):
vs. the bonferroni correction, which only gives me a single significance for each comparison:
Strangely I do get this warning for using holms-bonferroni, but not with bonferroni alone:
/opt/anaconda3/lib/python3.7/site-packages/statannotations/_Plotter.py:338: UserWarning: Invalid x-position found. Are the same parameters passed to seaborn and statannotations calls? or are there few data points?
"Invalid x-position found. Are the same parameters passed "
Thanks in advance.
This will be fixed in coming v0.4 in #16.
Hello, thanks for creating this package! I was looking around and didn't find any way to cite the statannotations
package, is there a specific way you'd like people to cite your package?
https://pandas.pydata.org/about/citing.html
https://scipy.org/citing-scipy/
https://matplotlib.org/stable/users/project/citing.html
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.