@@ -75,12 +75,15 @@ def clabel(self, *args, **kwargs):
75
75
76
76
only labels contours listed in *v*.
77
77
78
- Optional keyword arguments:
78
+ Parameters
79
+ ----------
80
+ fontsize : string or float, optional
81
+ Size in points or relative size e.g., 'smaller', 'x-large'.
82
+ See `Text.set_size` for accepted string values.
79
83
80
- *fontsize* :
81
- size in points or relative size e.g., 'smaller', 'x-large'
84
+ colors :
85
+ Color of each label
82
86
83
- *colors*:
84
87
- if *None*, the color of each label matches the color of
85
88
the corresponding contour
86
89
@@ -91,47 +94,50 @@ def clabel(self, *args, **kwargs):
91
94
different labels will be plotted in different colors in the order
92
95
specified
93
96
94
- *inline*:
95
- controls whether the underlying contour is removed or
96
- not. Default is *True*.
97
+ inline : bool, optional
98
+ If ``True`` the underlying contour is removed where the label is
99
+ placed. Default is ``True``.
100
+
101
+ inline_spacing : float, optional
102
+ Space in pixels to leave on each side of label when
103
+ placing inline. Defaults to 5.
104
+
105
+ This spacing will be exact for labels at locations where the
106
+ contour is straight, less so for labels on curved contours.
97
107
98
- *inline_spacing*:
99
- space in pixels to leave on each side of label when
100
- placing inline. Defaults to 5. This spacing will be
101
- exact for labels at locations where the contour is
102
- straight, less so for labels on curved contours.
108
+ fmt : string or dict, optional
109
+ A format string for the label. Default is '%1.3f'
103
110
104
- *fmt*:
105
- a format string for the label. Default is '%1.3f'
106
111
Alternatively, this can be a dictionary matching contour
107
112
levels with arbitrary strings to use for each contour level
108
113
(i.e., fmt[level]=string), or it can be any callable, such
109
114
as a :class:`~matplotlib.ticker.Formatter` instance, that
110
115
returns a string when called with a numeric contour level.
111
116
112
- * manual*:
113
- if * True* , contour labels will be placed manually using
114
- mouse clicks. Click the first button near a contour to
117
+ manual : bool or iterable, optional
118
+ If `` True`` , contour labels will be placed manually using
119
+ mouse clicks. Click the first button near a contour to
115
120
add a label, click the second button (or potentially both
116
- mouse buttons at once) to finish adding labels. The third
121
+ mouse buttons at once) to finish adding labels. The third
117
122
button can be used to remove the last label added, but
118
- only if labels are not inline. Alternatively, the keyboard
123
+ only if labels are not inline. Alternatively, the keyboard
119
124
can be used to select label locations (enter to end label
120
125
placement, delete or backspace act like the third mouse button,
121
126
and any other key will select a label location).
122
127
123
- *manual* can be an iterable object of x,y tuples. Contour labels
124
- will be created as if mouse is clicked at each x,y positions.
128
+ *manual* can also be an iterable object of x,y tuples.
129
+ Contour labels will be created as if mouse is clicked at each
130
+ x,y positions.
125
131
126
- * rightside_up*:
127
- if * True* (default) , label rotations will always be plus
128
- or minus 90 degrees from level.
132
+ rightside_up : bool, optional
133
+ If `` True`` , label rotations will always be plus
134
+ or minus 90 degrees from level. Default is ``True``.
129
135
130
- * use_clabeltext*:
131
- if * True* (default is False), ClabelText class (instead of
132
- matplotlib.Text) is used to create labels. ClabelText
133
- recalculates rotation angles of texts during the drawing time,
134
- therefore this can be used if aspect of the axes changes.
136
+ use_clabeltext : bool, optional
137
+ If `` True``, ` ClabelText` class (instead of `Text`) is used to
138
+ create labels. ` ClabelText` recalculates rotation angles
139
+ of texts during the drawing time, therefore this can be used if
140
+ aspect of the axes changes. Default is ``False`` .
135
141
"""
136
142
137
143
"""
@@ -144,7 +150,7 @@ def clabel(self, *args, **kwargs):
144
150
145
151
Once these attributes are set, clabel passes control to the
146
152
labels method (case of automatic label placement) or
147
- BlockingContourLabeler (case of manual label placement).
153
+ ` BlockingContourLabeler` (case of manual label placement).
148
154
"""
149
155
150
156
fontsize = kwargs .get ('fontsize' , None )
0 commit comments