52
52
53
53
class AxisArtistHelper :
54
54
"""
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.
58
57
58
+ ::
59
59
60
- # LINE (spinal line?)
60
+ # Construct the spine.
61
61
62
62
def get_line(self, axes):
63
- # path : Path
64
63
return path
65
64
66
65
def get_line_transform(self, axes):
67
- # ...
68
- # trans : transform
69
- return trans
66
+ return transform
70
67
71
- # LABEL
68
+ # Construct the label.
72
69
73
70
def get_label_pos(self, axes):
74
- # x, y : position
75
- return (x, y), trans
76
-
71
+ return (x, y), transform
77
72
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
87
76
88
- # TICK
77
+ # Construct the ticks.
89
78
90
79
def get_tick_transform(self, axes):
91
- return trans
80
+ return transform
92
81
93
82
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).
97
85
return iter_major, iter_minor
98
86
"""
99
87
@@ -117,10 +105,7 @@ class Fixed(_Base):
117
105
top = (0 , 1 ))
118
106
119
107
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."""
124
109
_api .check_in_list (["left" , "right" , "bottom" , "top" ], loc = loc )
125
110
self ._loc = loc
126
111
0 commit comments