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

grouped boxplot #89

Closed
wants to merge 6 commits into from
Closed

grouped boxplot #89

wants to merge 6 commits into from

Conversation

wangjiawen2013
Copy link
Contributor

It's tricky to implement grouped boxplot as we need to adjust the postions and width of the boxes to optimize the visualization layout without the prior knowledge on the group numbers and boxes numbers in each group. Here two helper function was defined to help users adjust the layout automatically.

@wangjiawen2013
Copy link
Contributor Author

wangjiawen2013 commented Sep 23, 2024

The test_boxplot6 was passed in my system, maybe it failed because of the git cache.

@cpmech
Copy link
Owner

cpmech commented Sep 23, 2024

Hi, thanks for the PR. As far as I can see, the PR adds two functions named adjust_positions_and_width_.... They are a specific use of Boxplot and are best left out for the users to implement if they need such a feature.

@cpmech
Copy link
Owner

cpmech commented Sep 23, 2024

Thanks again for the improvement. Nonetheless, this is too specific. I would rather have plotpy deliver only "foundation" structures (as Matplotlib) for the users to create their own applications.

@cpmech cpmech closed this Sep 23, 2024
@wangjiawen2013
Copy link
Contributor Author

I moved the two functions to the boxplot structure, and now they are associated functions. Grouped boxplot is used widely, but it's very hard to adjust the layout for the users, especially the users that are not familiar with matplotlib. In fact, they usually seaborn and plotnine instead. For matplotlib users, this can save a lot of time.

@cpmech
Copy link
Owner

cpmech commented Sep 23, 2024

Thanks, but I still want plotpy to contain only essential functionality.

@wangjiawen2013
Copy link
Contributor Author

Can I add the two functions to the documentation ?

@cpmech
Copy link
Owner

cpmech commented Sep 23, 2024

I'd rather not have the functions in the documentation because, in the future, people may come to me asking for help, and I may not be able to help. Also, everything in the documentation needs to be fully tested, and thus, we would need "real" Rust code in there---i.e., it would be the same as having the code directly in the repository. I suggest you create a GitHub Gist to advertise such code snippets.

@wangjiawen2013
Copy link
Contributor Author

I'll open an issue and elaborate on how to plot grouped boxplot. I am worried that I'll forget the functions. It's takes some time to develop the layout algorithm.

@cpmech
Copy link
Owner

cpmech commented Sep 23, 2024

You may also create a GitHub Gist (see https://gist.github.com/) on your account to save "code that you don't want to forget" ;-)

@wangjiawen2013
Copy link
Contributor Author

I don't know about GitHub Gist, I'll try to use it later.

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.

2 participants