Skip to content

Filling in some library examples #12

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

Closed
wants to merge 5 commits into from

Conversation

jwhendy
Copy link

@jwhendy jwhendy commented Dec 29, 2017

Hi Tim,

Want to take a look at these? I kept it to just the bar and histogram plots so you could provide some feedback. The main issue several of these libraries have is no obvious way to generate an image and return that image into the notebook cell.

plotly
You can see some of the saga here, but there's no great way to get an image from plotly.offline. In the meantime I have a fork which lets me pass a save_img parameter. On my local repo, I have it return an IPython.display.Image() object so that the command is clean. You can see this isn't as nice for other libraries.

I broke down and created an account and creds for using py.image.ishow(), but I only have a free account. In just setting this repo up I exceeded my 100 call limit running make as there's 13 calls per run. It'd be nice to cache or something (or find a way to use offline).

bokeh
You can export, but I don't know how you render the plot directly, as it returns a path.

altair
The documentation says there's no way to save programmatically. I created a tmp_plots dir to save to manually and used alt_plot-type.png for the filename.

pygal
We can use render_to_png, but it returns some cairosvg.svg2png() call which I can't find. I get NoneType for var = p.render_to_png(fname).

Let me know if you ideas on a good route forward given the above. It would be nice if these web-based libs could just render in an iframe/be embedded. This is a lot of hoopla to get images when it's definitely not their native way and they'll end up on the web anyway :)

@tdhopper
Copy link
Owner

tdhopper commented Mar 5, 2018

Missed your PRs. I'll take a look when I get a chance.

@tdhopper
Copy link
Owner

I'm going to close this since the Plotly examples I have now work okay and Altair has been rewritten. I'm interested in trying to get the Bokeh examples in if you want to open a PR just with those examples.

@tdhopper tdhopper closed this Jul 12, 2018
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.

2 participants