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?)
61
-
62
- def get_line(self, axes):
63
- # path : Path
64
- return path
60
+ # Construct the spine.
65
61
66
62
def get_line_transform(self, axes):
67
- # ...
68
- # trans : transform
69
- return trans
63
+ return transform
70
64
71
- # LABEL
65
+ def get_line(self, axes):
66
+ return path
72
67
73
- def get_label_pos(self, axes):
74
- # x, y : position
75
- return (x, y), trans
68
+ # Construct the label.
76
69
70
+ def get_axislabel_transform(self, axes):
71
+ return 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_axislabel_pos_angle(self, axes):
74
+ return (x, y), angle
87
75
88
- # TICK
76
+ # Construct the ticks.
89
77
90
78
def get_tick_transform(self, axes):
91
- return trans
79
+ return transform
92
80
93
81
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
-
82
+ # A pair of iterables (one for major ticks, one for minor ticks)
83
+ # that yield (tick_position, tick_angle, tick_label).
97
84
return iter_major, iter_minor
98
85
"""
99
86
@@ -117,10 +104,7 @@ class Fixed(_Base):
117
104
top = (0 , 1 ))
118
105
119
106
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
- """
107
+ """``nth_coord = 0``: x-axis; ``nth_coord = 1``: y-axis."""
124
108
_api .check_in_list (["left" , "right" , "bottom" , "top" ], loc = loc )
125
109
self ._loc = loc
126
110
0 commit comments