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

Feature Request: Ordered Samples in plot_richness #342

Closed
zachcp opened this issue May 14, 2014 · 1 comment
Closed

Feature Request: Ordered Samples in plot_richness #342

zachcp opened this issue May 14, 2014 · 1 comment

Comments

@zachcp
Copy link
Contributor

zachcp commented May 14, 2014

Hi Joey711,

I have a small feature request: allowing ordering when plotting richness. In my use-case I often have many samples and it would be visually cleaner to be able to order the x-axis position of the samples to give the cleanest look. In this case sorting by the number of observed OTUS would generate a more interpretable graph. You could also imagine sorting the x-axis by some other grouping variable.

Would you have any interest in implementing this feature? There are a nubmer of examples on how to do this: here and here, for example. I would be happy to take a stab at it if you like.

thanks,
zach cp

joey711 added a commit that referenced this issue May 22, 2014
CHANGES IN VERSION 1.9.6
-------------------------

USER-VISIBLE CHANGES

	- New `sortby` argument in `plot_richness` function.

	- Sort discrete x by one or more alpha-diversity measures

	- Solves [Issue 342](#342)

	- Resolves/merges [Pull
343](#343)
joey711 added a commit that referenced this issue May 23, 2014
1.9.6 New sortby argument in plot_richness function

CHANGES IN VERSION 1.9.6

USER-VISIBLE CHANGES

- New `sortby` argument in `plot_richness` function.

- Sort discrete x by one or more alpha-diversity measures

- Solves [Issue 342](#342)

- Resolves/merges [Pull 343](#343)
@joey711
Copy link
Owner

joey711 commented May 23, 2014

Done!

I changed the spec a bit after looking into it. Sorry for the stray errand. The sample_variables suggestion was totally irrelevant, because the x-axis is mapped according to an explicit x argument. To make it work and make sense I expanded on the parts regarding the alpha-measure sorting, but included a couple checks that ensure that x-axis is mapped to a discrete variable (sorting wouldn't make sense if x is mapped to some continuous observation on samples), and also that sortby is among the included measures arguments. Also updated in the documentation and tests. Let me know if you find any deficiencies. It definitely does what you originally requested, plus some added flexibility with measures. Cool suggestion, and thanks for the pull!

joey

@joey711 joey711 closed this as completed May 23, 2014
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

No branches or pull requests

2 participants