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

Commitfadc7fc

Browse files
authored
Merge pull request#15505 from anntzer/axisartist-tut
Cleanup axisartist tutorial.
2 parents8be73a3 +cbb7abc commitfadc7fc

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

‎tutorials/toolkits/axisartist.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@
8787
Or a fixed axis with some offset ::
8888
8989
# make new (right-side) yaxis, but with some offset
90-
ax.axis["right2"] = ax.new_fixed_axis(loc="right",
91-
offset=(20, 0))
90+
ax.axis["right2"] = ax.new_fixed_axis(loc="right", offset=(20, 0))
9291
9392
axisartist with ParasiteAxes
9493
----------------------------
@@ -262,17 +261,18 @@
262261
263262
To turn all on but (axis) label off ::
264263
265-
ax.axis["bottom"].toggle(all=True, label=False))
264+
ax.axis["bottom"].toggle(all=True, label=False)
266265
267266
ax.axis's __getitem__ method can take multiple axis names. For
268267
example, to turn ticklabels of "top" and "right" axis on, ::
269268
270-
ax.axis["top","right"].toggle(ticklabels=True))
269+
ax.axis["top","right"].toggle(ticklabels=True)
271270
272-
Note that 'ax.axis["top","right"]' returns a simple proxy object that translate above code to something like below. ::
271+
Note that 'ax.axis["top", "right"]' returns a simple proxy object that
272+
translate above code to something like below. ::
273273
274-
for n in ["top","right"]:
275-
ax.axis[n].toggle(ticklabels=True))
274+
for n in ["top","right"]:
275+
ax.axis[n].toggle(ticklabels=True)
276276
277277
So, any return values in the for loop are ignored. And you should not
278278
use it anything more than a simple method.
@@ -301,7 +301,7 @@
301301
302302
3. To change the attributes of multiple axis::
303303
304-
ax.axis["left","bottom"].major_ticklabels.set_color("r")
304+
ax.axis["left","bottom"].major_ticklabels.set_color("r")
305305
306306
or to change the attributes of all axis::
307307
@@ -450,22 +450,22 @@
450450
451451
So, in summary,
452452
453-
* AxisArtist's methods
454-
* set_axis_direction: "left", "right", "bottom", or "top"
455-
* set_ticklabel_direction: "+" or "-"
456-
* set_axislabel_direction: "+" or "-"
457-
* invert_ticklabel_direction
458-
* Ticks' methods (major_ticks and minor_ticks)
459-
* set_tick_out: True or False
460-
* set_ticksize: size in points
461-
* TickLabels' methods (major_ticklabels and minor_ticklabels)
462-
* set_axis_direction: "left", "right", "bottom", or "top"
463-
* set_rotation: angle with respect to the reference direction
464-
* set_ha and set_va: see below
465-
* AxisLabels' methods (label)
466-
* set_axis_direction: "left", "right", "bottom", or "top"
467-
* set_rotation: angle with respect to the reference direction
468-
* set_ha and set_va
453+
* AxisArtist's methods
454+
* set_axis_direction: "left", "right", "bottom", or "top"
455+
* set_ticklabel_direction: "+" or "-"
456+
* set_axislabel_direction: "+" or "-"
457+
* invert_ticklabel_direction
458+
* Ticks' methods (major_ticks and minor_ticks)
459+
* set_tick_out: True or False
460+
* set_ticksize: size in points
461+
* TickLabels' methods (major_ticklabels and minor_ticklabels)
462+
* set_axis_direction: "left", "right", "bottom", or "top"
463+
* set_rotation: angle with respect to the reference direction
464+
* set_ha and set_va: see below
465+
* AxisLabels' methods (label)
466+
* set_axis_direction: "left", "right", "bottom", or "top"
467+
* set_rotation: angle with respect to the reference direction
468+
* set_ha and set_va
469469
470470
Adjusting ticklabels alignment
471471
------------------------------
@@ -541,8 +541,8 @@ def inv_tr(x, y):
541541
# system in degree
542542
tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()
543543
544-
# extreme finder : find a range of coordinate.
545-
# 20, 20: number of sampling points along x, y direction
544+
# extreme finder: find a range of coordinate.
545+
# 20, 20: number of sampling points along x, y direction
546546
# The first coordinate (longitude, but theta in polar)
547547
# has a cycle of 360 degree.
548548
# The second coordinate (latitude, but radius in polar) has a minimum of 0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp