cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
307 stars 156 forks source link

Export windows in vectorial formal #1178

Open FranciscoNaveros opened 1 year ago

FranciscoNaveros commented 1 year ago

I would need to export some of the windows in vector format. By default, they are saved using a .png format. This one can be changed modifying the function screenshot_default_path in the qt.py file of phy. For instance, in this version the images will be saved in .jpg:

def screenshot_default_path(widget, dir=None): """Return a default path for the screenshot of a widget.""" from phylib.utils._misc import phy_config_dir date = datetime.now().strftime('%Y%m%d%H%M%S') name = 'physcreenshot%s_%s.jpg' % (date, widget.class.name) path = (Path(dir) if dir else phy_config_dir() / 'screenshots') / name path.parent.mkdir(exist_ok=True, parents=True) return path

The problem it is that this option can not be used if you want to save the image in vector format (e.g. eps, svg, etc.). Is there some option to do that in phy?.

Francisco.

rossant commented 1 year ago

No that's not possible at the moment, unfortunately. The plotting code only generates raster images.