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

Feature suggestion: new cell magic %%save_png #13346

Open
kolibril13 opened this issue Nov 28, 2021 · 2 comments
Open

Feature suggestion: new cell magic %%save_png #13346

kolibril13 opened this issue Nov 28, 2021 · 2 comments
Milestone

Comments

@kolibril13
Copy link
Contributor

Similar to %%capture, it would be nice to have a cell magic to save Jupyter image cell output to files.
Usage could look like this:

%%save_png my_image_folder/foo.png
from IPython.display import Image
from pandas import Series
Series([1, 2, 2, 3, 3, 3]).hist()

and an implementation could look like this:
https://discourse.jupyter.org/t/cell-magic-to-save-image-output-as-a-png-file/11906/2?u=kolibril13

The benefit: Jupyter users won't have to look up e.g. fig.savefig("img/foo.png") or similar lines for other libraries and can simply type %%save_png.
I think IPython might be a good place for this feature, as similar cell magic already exists, and users won't need to install another package.

@bollwyvl
Copy link
Contributor

bollwyvl commented Nov 28, 2021 via email

@Carreau Carreau added this to the wishlist milestone Nov 29, 2021
@psychemedia
Copy link

psychemedia commented May 16, 2022

Re: nbexplode, thombashi/sqlitebiter will also split a notebook into components across a set of simple sqlite database tables. (I don't think there's a recombiner though?)

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

4 participants