When adjusting fields in matplotlib

I am trying to minimize the margins around a 1X2 shape, a shape that is two stacked subnets. I searched a lot and came up with commands like:

self.figure.subplots_adjust(left=0.01, bottom=0.01, top=0.99, right=0.99) 

Which leaves a large gap at the top and between the subheadings. Playing with these parameters, much less understanding of them was tough (for example, ValueError: bottom cannot be >= top )

enter image description here


My questions:

What is the command to completely collapse the fields?

What do these numbers mean, and which coordinate system does this (non-standard percentage thing and the starting point of this coordinate system)? What are the special rules at the top of this coordinate system?

Where exactly should this point be called? From the experiment, I realized that it works after you create the subtitles. What if you need to call it repeatedly after resizing the window and resizing the shape so that it is inside?

What are other layout customization methods, especially for a single subtitle?

+4
source share
1 answer

They are located in the shape coordinates: http://matplotlib.sourceforge.net/users/transforms_tutorial.html

To remove gaps between subheadings, use the wspace and hspace keywords for subplots_adjust .

If you want everything to be configured automatically, look tight_layout

Gridspec: http://matplotlib.sourceforge.net/users/gridspec.html

+9
source

All Articles