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

Appearance settings

Commit 5cf067a

Browse filesBrowse files
committed
Small cleanups to axislines docs.
1 parent bbde887 commit 5cf067a
Copy full SHA for 5cf067a

File tree

1 file changed

+15
-30
lines changed
Filter options

1 file changed

+15
-30
lines changed

‎lib/mpl_toolkits/axisartist/axislines.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/axislines.py
+15-30Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,48 +52,36 @@
5252

5353
class AxisArtistHelper:
5454
"""
55-
AxisArtistHelper should define
56-
following method with given APIs. Note that the first axes argument
57-
will be axes attribute of the caller artist.::
55+
Axis helpers should define the methods listed below. The *axes* argument
56+
will be the axes attribute of the caller artist.
5857
58+
::
5959
60-
# LINE (spinal line?)
60+
# Construct the spine.
6161
6262
def get_line(self, axes):
63-
# path : Path
6463
return path
6564
6665
def get_line_transform(self, axes):
67-
# ...
68-
# trans : transform
69-
return trans
66+
return transform
7067
71-
# LABEL
68+
# Construct the label.
7269
7370
def get_label_pos(self, axes):
74-
# x, y : position
75-
return (x, y), trans
76-
71+
return (x, y), transform
7772
78-
def get_label_offset_transform(self,
79-
axes,
80-
pad_points, fontprops, renderer,
81-
bboxes,
82-
):
83-
# va : vertical alignment
84-
# ha : horizontal alignment
85-
# a : angle
86-
return trans, va, ha, a
73+
def get_label_offset_transform(
74+
self, axes, pad_points, fontprops, renderer, bboxes):
75+
return transform, verticalalignment, horizontalalignment, angle
8776
88-
# TICK
77+
# Construct the ticks.
8978
9079
def get_tick_transform(self, axes):
91-
return trans
80+
return transform
9281
9382
def get_tick_iterators(self, axes):
94-
# iter : iterable object that yields (c, angle, l) where
95-
# c, angle, l is position, tick angle, and label
96-
83+
# A pair of iterables (one for major ticks, one for minor ticks)
84+
# that yield (tick_position, tick_angle, tick_label).
9785
return iter_major, iter_minor
9886
"""
9987

@@ -117,10 +105,7 @@ class Fixed(_Base):
117105
top=(0, 1))
118106

119107
def __init__(self, loc, nth_coord=None):
120-
"""
121-
nth_coord = along which coordinate value varies
122-
in 2D, nth_coord = 0 -> x axis, nth_coord = 1 -> y axis
123-
"""
108+
"""``nth_coord = 0``: x-axis; ``nth_coord = 1``: y-axis."""
124109
_api.check_in_list(["left", "right", "bottom", "top"], loc=loc)
125110
self._loc = loc
126111

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.