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

Add plotly plotting functionality #50

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ATayls
Copy link

@ATayls ATayls commented Nov 30, 2020

To incorporate into a plotly dash dashboard, I needed some functionality to create plotly fig object.

Using the bokeh plotting class as an example, created class PlotlyPlottableMixin that adds the plot_with_plotly method to Graphic record.

Added plot_with_plotly.py to examples and corresponding .html output.
Mirrored bokeh tests.
Updated readme.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.5%) to 90.18% when pulling 76e993f on ATayls:plotly-plot into 6ace5cd on Edinburgh-Genome-Foundry:master.

@ATayls ATayls marked this pull request as draft December 1, 2020 10:34
@ATayls ATayls marked this pull request as ready for review December 1, 2020 13:23
@ATayls
Copy link
Author

ATayls commented Dec 1, 2020

Travis CI checks were passing at 76e993f. Intermediary checks failed due to cancellation. Unsure why checks are not triggered at latest commit.

@veghp
Copy link
Member

veghp commented Dec 1, 2020

Thank you for this contribution. There are no plans currently to support plotly, but will discuss it. In the meantime, your work is not lost and can be installed directly from your fork, even with pip.

As for your question, unfortunately, Travis implemented open source build limitations for each account recently, so ideally you want to develop on your own fork and enable Travis to watch your repos (account is free to set up). Generally, once all your commits pass builds, you can make a PR.

@ATayls
Copy link
Author

ATayls commented Dec 1, 2020

Thanks for your reply. I'll look into Travis' behaviour on my fork. Originally I didn't intend to draft this PR and but ended up with a few more commits to increase coverage and tidy. From building and running pytest locally I believe this latest commit will pass the Travis check and increase coverage on coverall.

I think it would be great to have a small amount of plotly functionality, similarly to how you have implemented support for bokeh. I really like this package and it would be great to pull some plots into dash dashboards. I don't have any numbers but from my experience I feel Dash/plotly has surpassed bokeh in popularity over the past couple of years.

This PR aims to create plotly plots in an identical manner to the bokeh implementation, so hopefully if that method of using the MatplotlibPlottableMixin class is robust, this should be also.

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.

3 participants