Get the App
SLTechnology News&Howtos  ›  Development  › 

How to adjust the spacing between graphs by python

Shulou Source: shulou.com Published: 2022-06-01 13:02:50 10月02日 Update

This article mainly introduces the relevant knowledge of "how python adjusts the distance between graphs". The editor shows you the operation process through actual cases. The method of operation is simple and fast, and it is practical. I hope this article "how to adjust the spacing between graphs and diagrams in python" can help you solve the problem.

When using matplotlib to draw multiple graphs, the interval between the graph and the graph may not be what we want, too large or too small will affect the aesthetics of the page, and it is not easy to compare the data. So how to adjust the distance between the python diagram and the graph, in fact, the subplots_adjust parameter of matplotlib is used.

As follows: plt.subplots_adjust (left=None,bottom=None,right=None,top=None,wspace=0.15,hspace=0.15)

Adjustment of spacing between graphs

Wspace=0.15,hspace=0.15

Add: how python adjusts the spacing of subplot

Plt.subplots_adjust (left=None, bottom=None, right=None, top=None, wspace=None, hspace=None) left= 0.125 # the left side of the subplots of the figureright = 0.9 # the right side of the subplots of the figurebottom = 0.1 # the bottom of the subplots of the figuretop = 0.9 # the top of the subplots of the figurewspace = 0.2 # the amount of width reserved for blank space between subplots # expressed as a fraction of the average axis widthhspace = 0.2 # the amount of height reserved for white space between subplots, # expressed as a fraction of the average axis height on "how to adjust the spacing between graphs by python" ends here Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Spacing adjustment between knowledge practice industry different practical beautiful bad content parameters multiple practical actually data articles methods time more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Microsoft MySQL Huawei OPPO Reno