Replies: 2 comments 4 replies
-
So further to that I had a look through the splink source code and managed to save the objects as html file with the sample code below: from splink import charts I can see the charts in html format on the browser. How do I convert it to png through python? |
Beta Was this translation helpful? Give feedback.
3 replies
-
@illeamb Thanks for this thread. Update for future readers: Upon opening the saved HTML file there is a PNG download option. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been using the SPLINK package recently.
I was wondering how I can save some of the graphs that are generated from Splink. So the object that I am trying to print are :
linker.match_weights_chart()
linker.m_u_parameters_chart()
They appear to be Vegalite objects. Is there an easy way to save them as a png file? I wasn't sure whether there was any documentation on how to save the objects. If I have missed it, feel free to point me in the right direction.
Edit and Solution from maintainers 2023-06-16
This question is now out of date due to this PR
All charts produced Splink are now full Altair Charts
alt.Chart()
. You need to have Altair version 5 for them to work.This means all charts can now be more easily saved using e.g.
chart.save("myfile.png")
. Note you can use file extensionsjson
,png
,svg
,pdf
, orhtml
and others depending on what type output you wantSince all charts are now proper Altair charts, users experiencing difficulties should be asked to look at the Altair documentation.
Beta Was this translation helpful? Give feedback.
All reactions