Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX asterisks and chi-square test update #33

Open
wants to merge 1 commit into
base: statannot
Choose a base branch
from

Conversation

CameraEngineer
Copy link

@CameraEngineer CameraEngineer commented Sep 30, 2021

Change to statannot file to allow for asterisks to be the same as in LaTeX and the feature change to allow chi-squared tests on categorical data

Here are two examples of the chi-squared test after implementation in the statannot file:
Age60_CountPlot.pdf
RegionCountPlot.pdf

The asterisk changed to be the same as the one when you use LaTeX (The default asterisk did not have the same number of corners -- very strange).

I also added a way to not display the groups that were not significant and only list the p-value as an output. This helped for figure generation for Journal articles.

Thanks!

…LaTeX and the feature change to allow chi-squared tests on categorical data
@trevismd trevismd changed the base branch from master to statannot October 1, 2021 05:50
@trevismd
Copy link
Owner

I think it is time for a little update on this. I have not forgotten about it, but there are several things in one go:
count plots, Chi-square tests (using counts), removing annotations for non-significant results, and adapting pvalue_thresholds for LaTeX.
Of these things, I think the count plot and Chi-square tests should definitely be integrated.
I can port it to the current codebase, but maybe you'd like to have a go at it ? I'm afraid I can't use this commit directly as there has been too many changes in statannotations since then.

Removing non significant results has been quite a popular request, but there was also some good counter points about it. I haven't made my mind about it yet.
Finally, the stars formatting for LaTeX is one of these things that can be configured in a user script, so the question is whether to include it as an additional parameter for configuration, such as for_latex=True, and that requires some thought to make it robust. Is there probably any other such export format, and then how to handle those?

@CameraEngineer
Copy link
Author

CameraEngineer commented Oct 26, 2021 via email

@CameraEngineer
Copy link
Author

I have since modified the newest version of statannotations to allow for changing the text_format to "LaTeX" to print out a LaTeX asterisk instead of a five-sided star. However, I am unable to create a new branch and push the commit. I created a new branch "LaTeXStar" but got an error message after trying to use my personal access token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants