Is it possible to use a SVG image as tick label in Matplotlib?
I am trying to do something similar to this but my images are SVG.
Do I have to convert all images to PNG for the above answer to work or can I use SVG directly?
Is it possible to use a SVG image as tick label in Matplotlib?
I am trying to do something similar to this but my images are SVG.
Do I have to convert all images to PNG for the above answer to work or can I use SVG directly?
Short answer yes, you do need to convert them first.
From the matplotlib.image
page,
Notes
Matplotlib can only read PNGs natively. Further image formats are supported via the optional dependency on Pillow.
A list of supported file formats for Pillow's current stable release can be found here (including read only and write only supported), at the time of writing this, the list of fully supported formats is
If you want to use your SVG images they will need to first be converted to PNG if your matplotlib installation is not using Pillow and any of the above if it is.