Save SVG version of the forest plot
Mihiretukebede opened this issue · 7 comments
Thanks for this great library! I prefer to write my plots in SVG since it has a much better resolution than PNG or JPEG formats. I tried to use plt.savefig()
function but it writes an empty file. Is it not possible to save the plot outputs in svg? It would be great if this feature is added.
hi @Mihiretukebede, thanks for giving this package a go. Do you have a reproducible example? I seem to have no issues saving in SVG.
Perhaps see also issue #38. Specifically #38 (comment)
I tried saving using the following but it didn't work.
plt.savefig("plot.svg")
@Mihiretukebede try this
plt.savefig("plot.svg", bbox_inches="tight")
plt.savefig("Python_Forest_plot.svg", bbox_inches="tight")
Unfortunately, this results in an error.
AttributeError: 'AxesSubplot' object has no attribute 'savefig'
@Mihiretukebede can you provide more context?
or see this: https://stackoverflow.com/a/33617056