0

I cannot override the Seaborn defaults on image size.

I would think that the plt.figure(figsize=(8.5,11)) would specify the actual dimensions of the image saved. It does not. The dimensions of the saved file are 4.5" by 2.25". That is different from 8.5" x 11".

import pandas as pd
import seaborn as sb
from matplotlib import pyplot as plt
plt.figure(figsize=(8.5,11))

df = sb.load_dataset('tips')
g = sb.FacetGrid(df, col = "time")
g.map(plt.hist, "tip")
plt.savefig("size_test_plot.jpg")
plt.show()

What is the solution?

EHB
  • 1,127
  • 3
  • 13
  • 24

0 Answers0