@@ -133,19 +133,21 @@ def _valid_plot_kwargs():
133
133
'Validator' : lambda value : _kwarg_not_implemented (value ) },
134
134
135
135
'marketcolor_overrides' : { 'Default' : None ,
136
- 'Description' : '' ,
136
+ 'Description' : 'sequence of color objects to override market colors.' +
137
+ 'sequence must be same length as ohlc(v) DataFrame. Each' +
138
+ 'color object may be a color, marketcolor object, or None.' ,
137
139
'Validator' : _mco_validator },
138
140
139
141
'mco_faceonly' : { 'Default' : False , # If True: Override only the face of the candle
140
- 'Description' : '' ,
142
+ 'Description' : 'True/False marketcolor_overrides only apply to face of candle. ' ,
141
143
'Validator' : lambda value : isinstance (value ,bool ) },
142
144
143
145
'no_xgaps' : { 'Default' : True , # None means follow default logic below:
144
146
'Description' : '' ,
145
147
'Validator' : lambda value : _warn_no_xgaps_deprecated (value ) },
146
148
147
149
'show_nontrading' : { 'Default' : False ,
148
- 'Description' : '' ,
150
+ 'Description' : 'True/False show spaces for non-trading days/periods ' ,
149
151
'Validator' : lambda value : isinstance (value ,bool ) },
150
152
151
153
'figscale' : { 'Default' : None , # scale base figure size up or down.
@@ -184,31 +186,34 @@ def _valid_plot_kwargs():
184
186
'Validator' : lambda value : isinstance (value ,(str ,dict )) },
185
187
186
188
'ylabel' : { 'Default' : 'Price' , # y-axis label
187
- 'Description' : '' ,
189
+ 'Description' : 'label for y-axis of main plot ' ,
188
190
'Validator' : lambda value : isinstance (value ,str ) },
189
191
190
192
'ylabel_lower' : { 'Default' : None , # y-axis label default logic below
191
- 'Description' : '' ,
193
+ 'Description' : 'label for y-axis of volume ' ,
192
194
'Validator' : lambda value : isinstance (value ,str ) },
193
195
194
196
'addplot' : { 'Default' : None ,
195
- 'Description' : '' ,
197
+ 'Description' : 'addplot object or sequence of addplot objects (from `mpf.make_addplot()`) ' ,
196
198
'Validator' : lambda value : isinstance (value ,dict ) or (isinstance (value ,list ) and all ([isinstance (d ,dict ) for d in value ])) },
197
199
198
200
'savefig' : { 'Default' : None ,
199
- 'Description' : '' ,
201
+ 'Description' : 'file name, or BytesIO, or dict with key `fname` plus other keys allowed as ' +
202
+ ' kwargs to matplotlib `Figure.savefig()`' ,
200
203
'Validator' : lambda value : isinstance (value ,dict ) or isinstance (value ,str ) or isinstance (value , io .BytesIO ) or isinstance (value , os .PathLike ) },
201
204
202
205
'block' : { 'Default' : None ,
203
- 'Description' : '' ,
206
+ 'Description' : 'True/False wait for figure to be closed before returning ' ,
204
207
'Validator' : lambda value : isinstance (value ,bool ) },
205
208
206
209
'returnfig' : { 'Default' : False ,
207
- 'Description' : '' ,
210
+ 'Description' : 'return Figure and list of Axes objects created by mplfinance;' +
211
+ ' user must display plot when ready, usually by calling `mpf.show()`' ,
208
212
'Validator' : lambda value : isinstance (value ,bool ) },
209
213
210
214
'return_calculated_values' : { 'Default' : None ,
211
- 'Description' : '' ,
215
+ 'Description' : 'set to a variable containing an empty dict; `mpf.plot()` will fill' +
216
+ ' the dict with various mplfinance calculated values' ,
212
217
'Validator' : lambda value : isinstance (value , dict ) and len (value ) == 0 },
213
218
214
219
'set_ylim' : { 'Default' : None ,
@@ -221,7 +226,7 @@ def _valid_plot_kwargs():
221
226
and all ([isinstance (v ,(int ,float )) for v in value ])},
222
227
223
228
'xlim' : { 'Default' : None ,
224
- 'Description' : 'Limits for x-axis as tuple (min, max), i.e. (left,right)' ,
229
+ 'Description' : 'Limits for x-axis as tuple (min,max), i.e. (left,right)' ,
225
230
'Validator' : lambda value : _xlim_validator (value ) },
226
231
227
232
'set_ylim_panelB' : { 'Default' : None ,
@@ -230,23 +235,42 @@ def _valid_plot_kwargs():
230
235
231
236
'hlines' : { 'Default' : None ,
232
237
'Description' : '' ,
238
+ 'Description' : 'Draw one or more HORIZONTAL LINES across entire plot, by' +
239
+ ' specifying a price, or sequence of prices. May also be a dict' +
240
+ ' with key `hlines` specifying a price or sequence of prices, plus' +
241
+ ' one or more of the following keys: `colors`, `linestyle`,' +
242
+ ' `linewidths`, `alpha`.' ,
233
243
'Validator' : lambda value : _hlines_validator (value ) },
234
244
235
245
'vlines' : { 'Default' : None ,
236
- 'Description' : '' ,
246
+ 'Description' : 'Draw one or more VERTICAL LINES across entire plot, by' +
247
+ ' specifying a date[time], or sequence of date[time]. May also' +
248
+ ' be a dict with key `vlines` specifying a date[time] or sequence' +
249
+ ' of date[time], plus one or more of the following keys:' +
250
+ ' `colors`, `linestyle`, `linewidths`, `alpha`.' ,
237
251
'Validator' : lambda value : _vlines_validator (value ) },
238
252
239
253
'alines' : { 'Default' : None ,
240
- 'Description' : '' ,
254
+ 'Description' : 'Draw one or more ARBITRARY LINES anywhere on the plot, by' +
255
+ ' specifying a sequence of two or more date/price pairs, or by' +
256
+ ' specifying a sequence of sequences of two or more date/price pairs.' +
257
+ ' May also be a dict with key `alines` (as date/price pairs described above),' +
258
+ ' plus one or more of the following keys:' +
259
+ ' `colors`, `linestyle`, `linewidths`, `alpha`.' ,
241
260
'Validator' : lambda value : _alines_validator (value ) },
242
261
243
262
'tlines' : { 'Default' : None ,
244
- 'Description' : '' ,
263
+ 'Description' : 'Draw one or more TREND LINES by specifying one or more pairs of date[times]' +
264
+ ' between which each trend line should be drawn. May also be a dict with key' +
265
+ ' `tlines` as just described, plus one or more of the following keys:' +
266
+ ' `colors`, `linestyle`, `linewidths`, `alpha`, `tline_use`,`tline_method`.' ,
245
267
'Validator' : lambda value : _tlines_validator (value ) },
246
268
247
269
'panel_ratios' : { 'Default' : None ,
248
- 'Description' : '' ,
249
- 'Validator' : lambda value : isinstance (value ,(tuple ,list )) and len (value ) <= 10 and
270
+ 'Description' : 'sequence of numbers indicating relative sizes of panels; sequence len' +
271
+ ' must be same as number of panels, or len 2 where first entry is for' +
272
+ ' main panel, and second entry is for all other panels' ,
273
+ 'Validator' : lambda value : isinstance (value ,(tuple ,list )) and len (value ) <= 32 and
250
274
all ([isinstance (v ,(int ,float )) for v in value ]) },
251
275
252
276
'main_panel' : { 'Default' : 0 ,
0 commit comments