phy icon indicating copy to clipboard operation
phy copied to clipboard

Export windows in vectorial formal

Open FranciscoNaveros opened this issue 3 years ago • 1 comments

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 = 'phy_screenshot%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.

FranciscoNaveros avatar Oct 31 '22 20:10 FranciscoNaveros

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

rossant avatar Nov 01 '22 14:11 rossant