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

Enable saving plots #107

Closed
jeromekelleher opened this issue Jan 9, 2024 · 7 comments
Closed

Enable saving plots #107

jeromekelleher opened this issue Jan 9, 2024 · 7 comments

Comments

@jeromekelleher
Copy link
Member

Bokeh supports saving plots to some degree. We should see if we can use this to export particular views of (e.g.) the mutations browser.

@benjeffery
Copy link
Member

I've started looking into this, and have a basic png of the mutations plot:
mutations_scatter

This requires selenium which is available with a pip install. Are we ok with this as it is a heavy dependency, we could make it an optional one?

@jeromekelleher
Copy link
Member Author

Would need some discussion I think. Is there a way to do a "screen grab" with some JS, client side?

@benjeffery
Copy link
Member

benjeffery commented Apr 18, 2024

Ah, I now realise this issue is focussed on having a save button on the UI when viewing on web. I was mainly thinking about the non-interactive pipeline use case.

@jeromekelleher
Copy link
Member Author

Yeah, that's a separate issue

@benjeffery
Copy link
Member

There's no easy way to screenshot part of a webpage from JavaScript. (You have to play games like re-rendering the html to a canvas) Best way would be to serve pngs made by the API suggested at #158.

@jeromekelleher
Copy link
Member Author

Best way would be to serve pngs made by the API suggested at #158.

It is a somewhat different use-case as we want poeple to be able to do some zooming in etc. But they can always just use screen grabs to be honest, so maybe we should just not bother with this.

@benjeffery
Copy link
Member

I'm closing this - the bokeh plots already have a save button and doing anything to save larger parts of the page is too complicated.

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