Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteb78a4e

Browse files
committed
DOC: transforms
1 parentfd8686e commiteb78a4e

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

‎examples/subplots_axes_and_figures/subpanels.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ def example_plot(ax, fontsize=12, hide_labels=False):
3030
axsLeft=subpanels[0].subplots(1,2,sharey=True)
3131
subpanels[0].set_facecolor('0.75')
3232
foraxinaxsLeft:
33-
pc=example_plot(ax)
33+
pc=example_plot(ax)
3434
subpanels[0].suptitle('Left plots',fontsize='x-large')
3535
subpanels[0].colorbar(pc,shrink=0.6,ax=axsLeft,location='bottom')
3636

3737
axsRight=subpanels[1].subplots(3,1,sharex=True)
3838
fornn,axinenumerate(axsRight):
39-
pc=example_plot(ax,hide_labels=True)
40-
ifnn==2:
41-
ax.set_xlabel('xlabel')
42-
ifnn==1:
43-
ax.set_ylabel('ylabel')
39+
pc=example_plot(ax,hide_labels=True)
40+
ifnn==2:
41+
ax.set_xlabel('xlabel')
42+
ifnn==1:
43+
ax.set_ylabel('ylabel')
4444
subpanels[1].set_facecolor('0.85')
4545
subpanels[1].colorbar(pc,shrink=0.6,ax=axsRight)
4646
subpanels[1].suptitle('Right plots',fontsize='x-large')

‎lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ def apply_aspect(self, position=None):
16491649
bb=mtransforms.Bbox.from_bounds(0,0,1,1).transformed(trans)
16501650
# this is the physical aspect of the panel (or figure):
16511651
fig_aspect=bb.height/bb.width
1652-
1652+
16531653
ifself._adjustable=='box':
16541654
ifselfinself._twinned_axes:
16551655
raiseRuntimeError("Adjustable 'box' is not allowed in a "

‎lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def __init__(
135135
# Calculate the pseudo-data width and height
136136
pseudo_bbox=self.transLimits.inverted().transform([(0,0), (1,1)])
137137
self._pseudo_w,self._pseudo_h=pseudo_bbox[1]-pseudo_bbox[0]
138-
138+
139139
# mplot3d currently manages its own spines and needs these turned off
140140
# for bounding box calculations
141141
forkinself.spines.keys():

‎tutorials/advanced/transforms_tutorial.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
| | |is bottom left of the axes, and |
3030
| | |(1, 1) is top right of the axes. |
3131
+----------------+-----------------------------+-----------------------------------+
32+
|"subpanel" |``subpanel.transPanel`` |The coordinate system of the |
33+
| | |`.Subpanel`; (0, 0) is bottom left |
34+
| | |of the subpanel, and (1, 1) is top |
35+
| | |right of the subpanel. If a |
36+
| | |figure has no subpanels, this is |
37+
| | |the same as ``transFigure``. |
38+
+----------------+-----------------------------+-----------------------------------+
3239
|"figure" |``fig.transFigure`` |The coordinate system of the |
3340
| | |`.Figure`; (0, 0) is bottom left |
3441
| | |of the figure, and (1, 1) is top |

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp