question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Render and Drag plots as PDFs from IW

See original GitHub issue

Sometimes I need to quickly send people a plot over Slack I just created in the interactive window. A cool feature is that you can just drag and drop figures out of the IW. What you get is always a PNG. Is there a way to get a PDF instead without needing to think of a file name and call plt.savefig("my_plot.pdf"), then find the file in Finder? PDFs are usually smaller in file size and vector graphics too, so can be scaled zoomed and searched for text.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
IanMatthewHuffcommented, Jan 27, 2022

I need to try it myself, I think that would generate both, but the drag and drop wouldn’t get the pdf it would get the rendered png.

1reaction
IanMatthewHuffcommented, Jan 27, 2022

@janosh This is actually what I was thinking of (it’s how we changed from SVG to PNG): https://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html#IPython.display.set_matplotlib_formats We tweak this value ourselves (we actually have a bug to not override user defaults here), but you should be able to change it after kernel start.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Learn to create Drag-able Charts for Web & Mobile
Drag -able Charts are used to visually manipulate the data on a chart in Real-Time. Learn how to make interactive drag charts with...
Read more >
rgl Overview
The rgl package is used to produce interactive 3-D plots. ... and hold with the left mouse button, you can rotate the plot...
Read more >
Using MATLAB Graphics
Drag and Drop Plotting. You can also drag the variable directly into an axes, in which case MATLAB selects the first appropriate plot...
Read more >
Graph Plotting - Northwestern University PLT
Any plot can be rendered to PNG, PDF, PS and SVG files using plot-file and plot3d- ... To anonymize spatial data, showing i.e....
Read more >
Visualization with ParaView
Volume rendering. – Clipping ... VTK simple legacy format (http://www.vtk.org/VTK/img/file-formats.pdf) ... (i.e. vector arrows) to the result.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found