English 中文(简体)
使用配对器时的湿度
原标题:Huge margin when using matplotlib supxlabel

我正试图在试爆器中添加一个共同的标签,但我有一些麻烦。

我正在使用第3.10和3.5.1页。

仅举几个例子说明问题:

import matplotlib.pyplot as plt
fig, axs = plt.subplots(3, 2, figsize=(8, 12),  sharex=True, sharey=True)
fig.supxlabel( Example of supxlabel )
fig.supylabel( Example of supylabel )
fig.subplots_adjust(wspace=0, hspace=0)
plt.savefig( test.pdf , bbox_inches= tight , pad_inches=0)

该法典得出以下数字:

“this

注:<代码>上宽度幅度很大 up/密码和<代码>的权利 顶皮拉贝()。

我尝试使用以下选择:constraining_layout=True,以及fig.set_consrain_layout_pads,但并没有解决我的问题。

我知道,这个问题可以通过以下选择加以解决:x,y,va<>>>>supxlabel>>>supylabel,但我有许多数据可以生成,而且无法现实地找到这些备选办法的价值观,并人工确定这些办法。

问题回答

<<>Edit>/strong>:最简单的是plt.subplots (layout=stric >,为各类操纵工作做了非常出色的工作;以下是,如果需要完全控制, 约束(从我能说得起)获得许可证。


我目前的工作是y = np.sqrt(hels) / 100* 2.2/code>,这似乎至少在5至25年期间为hala。 如果使用<代码>分辨率_adjust(bottom=,那么,一个不变的调整系数似乎在发挥作用,例如y -=.04>。 I ve open an Issue

width = 10
height = 20
y = np.sqrt(height) / 100 * 2.2
fig, _ = plt.subplots(23, 1, figsize=(width, height))
fig.supxlabel("supxlabel", y=y)

“enter





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...