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

Plot formatting issues to generate publication-ready figures #7

Open
nbokulich opened this issue Oct 12, 2016 · 4 comments
Open

Plot formatting issues to generate publication-ready figures #7

nbokulich opened this issue Oct 12, 2016 · 4 comments

Comments

@nbokulich
Copy link
Member

nbokulich commented Oct 12, 2016

Improvement Description
The boxplots and dot plots are great as a quick report, but are not publication-ready and cannot be edited in illustrator.

The moving pictures tutorial PD boxplots are a good example; particularly when setting the category to "ReportedAntibioticUsage", the columns (n = 2) become very wide and ugly, as plot width remains constant.

Proposed Behavior
I have a number of suggestions to improve these (ordered by importance). Some of these suggestions imply an interactive visualizer (similar to q2-types or emperor) so might be unnecessarily complex here, but others are more general and could be input as parameters, similar to something like qiime1's make_distance_boxplots.py (and even if an interactive visualizer is feasible, setting these parameters programmatically should still be possible).

  1. Plot width should scale by number of columns by default. Thus, a 2-column boxplot should be fairly narrow and a, say, 18-column boxplot should fill the screen.
  2. Drag plot edges to manually resize
  3. Allow coloring/scaling of points by metadata
  4. For correlation plots, support trendlines, curve smoothing/rolling averages, and confidence intervals by metadata category (and toggle on/off data points), ideally with user-defined colors.
  5. Toggle on/off outlier points on boxplots.
  6. Select color for labels, axes, and background
  7. Select font typeface and size (in points/picas)
  8. boxplots generated by beta-group-significance and alpha-group-significance appear to be formatted differently. Making these uniform would be nice for publication.
  9. Allow in-line editing of labels, e.g., to rename cryptic metadata names that are used as labels
  10. Set axis ranges and intervals
  11. Allow manual ordering of columns in boxplots. Dragging/dropping columns to re-order would be a neat way to do this in an interactive way.
  12. Allow all plots to be printed in multiple formats: SVG, PDF, TIFF, JPEG

References

  1. cannot be edited in illustrator
  2. PD boxplots
  3. make_distance_boxplots.py
  4. beta-group-significance
  5. alpha-group-significance
@thermokarst
Copy link

Thanks @nbokulich! I think all of these points will be pretty straightforward to address (thanks for prioritizing them!). A few quick comments about the differences between the alpha vs beta group significance plots. We are still in the process of unifying all of the core visualizations, and beta group significance is one of the vizs that hasn't yet had an upgrade from seaborn to d3, but hopefully it will soon!

RE: publication ready figs. The D3-generated plots in alpha group significance are exportable to SVG (through the interactive interface), so at the moment (even without the awesome additions you asked for above), opening the SVG file in an editor should allow you to at least tweak/customize the plot (I know this is cumbersome, but it is at least somewhat better than a raster JPG from matplotlib!).

Regarding export to multiple formats, since we are generating these visualizations on the fly in the browser, it might be easiest to limit the exportable formats to two (one vector and one raster) and do any further conversions down the line. Since the plots are natively constructed in SVG, the vector format can continue to be SVG, and maybe raster could be PNG?

For anyone else reading this, @nbokulich and I are planning on coordinating the week of Oct 17th to discuss qiime2 visualizations as a whole. We will provide updates as they are available!

@gregcaporaso
Copy link
Member

Thanks for the great suggestions, and for coordinating on this!

Sent from my phone, please excuse typos and brevity.

On Oct 13, 2016 6:15 AM, "Matthew Dillon" [email protected] wrote:

Thanks @nbokulich https://github.com/nbokulich! I think all of these
points will be pretty straightforward to address (thanks for prioritizing
them!). A few quick comments about the differences between the alpha vs
beta group significance plots. We are still in the process of unifying
https://github.com/qiime2/q2templates all of the core visualizations,
and beta group significance is one of the vizs that hasn't yet had an
upgrade from seaborn to d3, but hopefully it will soon!

RE: publication ready figs. The D3-generated plots in alpha group
significance are exportable to SVG (through the interactive interface), so
at the moment (even without the awesome additions you asked for above),
opening the SVG file in an editor should allow you to at least
tweak/customize the plot (I know this is cumbersome, but it is at least
somewhat better than a raster JPG from matplotlib!).

Regarding export to multiple formats, since we are generating these
visualizations on the fly in the browser, it might be easiest to limit the
exportable formats to two (one vector and one raster) and do any further
conversions down the line. Since the plots are natively constructed in SVG,
the vector format can continue to be SVG, and maybe raster could be PNG?

For anyone else reading this, @nbokulich https://github.com/nbokulich
and I are planning on coordinating the week of Oct 17th to discuss qiime2
visualizations as a whole. We will provide updates as they are available!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#7,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALvdPBHqM9IpswIjCua_zwJUq_sSml-ks5qzi7vgaJpZM4KVNYG
.

@antgonza
Copy link
Member

antgonza commented Oct 3, 2017

Not sure if worth adding another issue for this as my suggestion hints into point 10 here. I think all y axes should have the same ranges and intervals. Currently, each individual plot has it's own values, which depending on the values it might be confusing.

@cherman2
Copy link
Contributor

Moving to vizard so that we consider these suggestion when building vizard!

@lizgehret lizgehret transferred this issue from qiime2/q2-diversity Sep 19, 2023
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

5 participants