I'm trying to create some Seaborn plots for an upcoming book and the x/y tick values are getting corrupted when saving it as a PNG.
Using version 0.12.1.
# bug in seaborn objects matplotlib saving
import matplotlib.pyplot as plt
import pandas as pd
import seaborn.objects as so
url = 'https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/master/csv/DAAG/possum.csv'
df = pd.read_csv(url, index_col=[0])
fig, ax = plt.subplots(figsize=(6,4))
(so
.Plot(df, x='age', y='skullw', color='sex')
.add(so.Dots())
.on(fig)
.plot()
)
fig.savefig('/tmp/so.png', dpi=600, bbox_inches='tight')
The result looks like this:

However, if I remove the saving logic....
(so
.Plot(df, x='age', y='skullw', color='sex')
.add(so.Dots())
)
The plot looks like this:

I'm trying to create some Seaborn plots for an upcoming book and the x/y tick values are getting corrupted when saving it as a PNG.
Using version 0.12.1.
The result looks like this:

However, if I remove the saving logic....
The plot looks like this: