Home > Back-end >  seaborn output plot file size/alignment?
seaborn output plot file size/alignment?

Time:12-01

I have already looked through a bunch of posts and solution, the consensus is usually to change the figure size by using plt.figure(figsize=(3.2, 2.4)), which I am using for my graphs.

However, based on the x/y labels the graphs are incorrectly aligned on the output file. I am trying to insert 4 barplots in a LaTeX document: image

As you see, the graphs are in correct size but very misaligned which is not very satisfying. I do not believe I can do this in latex, I would love to find a solution for python here. Is there no way I can make the output file of each graph have the same alignment? I am using seaborn for the barplots.

CodePudding user response:

Okay, I have found a solution that works. By using plt.tight_layout() the graphs are correctly aligned on each pdf file.

  • Related