Open nfahlgren opened 4 years ago
the new version 4 has a new renderer that is supposed to work across the board. https://altair-viz.github.io/releases/changes.html Also, it has this interactive histogram feature that looks fairly awesome https://altair-viz.github.io/gallery/histogram_responsive.html
unfortunately i haven't gotten it to install alongside plantcv 3.8 through conda. i think there is a version incompatibility. will update if i figure it out.
@DannieSheng I know you were looking into interactive plotting! Here's another potential option to look into.
Is your feature request related to a problem? Please describe. The current graphing package we use is good, but @dschneiderch raised some good sustainability issues and suggested we look at altair as an alternative. I did a bit of testing with our histogram plotting functions and I thought it was pretty awesome. It uses data frames, so we would mostly only need to replace the graphing functions without having to do a lot of data reengineering. Switching to altair would eliminate a lot of the warnings we get during testing.
Describe the solution you'd like In
plantcv.analyze_color
, for example, plotting all color channels would look like this:The chart can be either plotted or saved:
To display charts the right renderer needs to be enabled. In my testing
alt.renderers.enable('notebook')
works in Jupyter Notebook butalt.renderers.enable('default')
works in Jupyter Lab. There are other options for other platforms. This might make things more complicated.Describe alternatives you've considered We have looked at quite a few options. Our preference is to avoid packages in the
matplotlib
family.plotnine
has been nice because ofggplot
-compatible syntax, but has some limitations.