Saving a plot

Open in Colab  run this example as a notebook — or grab the .ipynb (also linked at the bottom of the page)

To save a plot, simply use the save_path kwarg, and specify where you want the image to be saved, including the file extension (e.g. pdf)

save image
# Code source: Andrew Heusser
# License: MIT

# import
import hypertools as hyp

# load example data
data = hyp.load('weights_sample')

# plot
import os  # noqa: E402 (sphinx-gallery narrative section, not top-of-file)
import tempfile  # noqa: E402 (same)
save_path = os.path.join(tempfile.mkdtemp(), 'test-image.pdf')
hyp.plot(data, fmt='o', save_path=save_path)

Total running time of the script: (0 minutes 0.142 seconds)

Gallery generated by Sphinx-Gallery