I just finished with the python medical data visualizer project (I think!). The figure I get seems to match the one that was provided, but it still gives me some weird errors.
g = sns.catplot(data=df_cat, col='cardio',kind='count',hue='value',x='variable',order=('active','alco','cholesterol','gluc','overweight','smoke'))
g.set_axis_labels("variable", "total")
fig = g.fig
The theory behind the code is that sns.catplot() returns a FacetGrid-Object which itself doesn’t have any children (it seems to be an nd-array like the error message says), but it has an attribute (namely the .fig see the last line), which is a Figure-Object, so at last all the tests should pass.