jupyter-scatter icon indicating copy to clipboard operation
jupyter-scatter copied to clipboard

feat: exporting plots in high and custom resolution

Open abast opened this issue 1 year ago • 3 comments

I would like to use panels from jupyter-scatter as is for figures in a publication. Is it possible to export to png in high resolution?

abast avatar Jan 15 '24 18:01 abast

It is possible to export to PNG. Simply click on the button with the download icon on the left side.

To maximize the resolution I recommend the following: 0. If you have multiple screens, move the browser to the screen with the highest pixel density

  1. Maximize the width of the Jupyter cell by maximizing the browser width and collapsing the Jupyter side bar
  2. Choose a large scatter height

tl/dr: The resolution of the downloaded image depends on your screen and browser window size. Or in other words, the PNG download follows the "what you see is what you get" approach. So to download a high resolution PNG you have to maximize the browser window and scatter height. And ideally use a screen with a high pixel density. Unfortunately there isn't any other way at the moment to set the PNG resolution directly but I have ideas for how to support this in the future.

Note that this currently only downloads a PNG per instance, so if you composed multiple instances, you have to download an image per instance by clicking on each instance's download button.

flekschas avatar Jan 15 '24 20:01 flekschas

Thanks for your answer! This solves my issue for now. Some functionality to change the exported resolution independently of the screen would be a great feature in my opinion.

abast avatar Jan 16 '24 11:01 abast

I 💯% agree! I have some ideas how to accomplish this but I can't give any timeline when the new feature will land.

flekschas avatar Jan 16 '24 13:01 flekschas