Closed khyati123456 closed 1 year ago
plt.savefig("Chart_PNG.png", bbox_inches='tight', dpi=300, transparent=True)
Hi @khyati123456 👋,
Sorry for the long delay in replying 🙏, I had totally forgotten about this library, for years (and had GH notifications muted 🙈)
How to export Psychrochart figure as png/svg
chart.save("chart_image.svg")
or chart.save("chart_image.png", transparent=True)
will do the task you want, and as the Axes
object that chart.plot()
returns is a normal matplotlib obj, the usage of pyplot methods is also perfectly valid, as @7ukunft points with plt.savefig()
Also, in the latest version there is a method chart.make_svg()
to produce the SVG file as text, to include it in HTML or save it to disk 👌
in jupyter
, the better way to print the plot would be:
from IPython.core.display import HTML
from psychrochart import PsychroChart
chart = PsychroChart.create()
svg_data = chart.make_svg()
HTML(svg_data)
How to export Psychrochart figure as png/svg