@@ -127,7 +127,7 @@ def _mav_validator(mav_value):
127
127
'figscale' : { 'Default' : 0.75 , # scale base figure size (11" x 8.5") up or down.
128
128
129
129
'Implemented' : True ,
130
- 'Validator' : lambda value : isinstance (value ,float ) },
130
+ 'Validator' : lambda value : isinstance (value ,float ) or isinstance ( value , int ) },
131
131
132
132
'autofmt_xdate' :{ 'Default' : False ,
133
133
@@ -170,7 +170,9 @@ def _process_kwargs( kwargs ):
170
170
else :
171
171
value = kwargs [key ]
172
172
if not vkwargs [key ]['Validator' ](value ):
173
- raise ValueError ('kwarg "' + key + '" with invalid value: "' + str (value )+ '"' )
173
+ import inspect
174
+ v = inspect .getsource (vkwargs [key ]['Validator' ]).strip ()
175
+ raise ValueError ('kwarg "' + key + '" with invalid value: "' + str (value )+ '"\n ' + v )
174
176
# if we are here, then kwarg is valid as far as we can tell;
175
177
# replace the appropriate value in config:
176
178
config [key ] = value
@@ -205,15 +207,14 @@ def plot( data, **kwargs ):
205
207
if config ['volume' ]:
206
208
if volumes is None :
207
209
raise ValueError ('Request for volume, but NO volume data.' )
208
- ax1 = fig .add_axes ( [0.05 , 0.25 , 0.9 , 0.7 ] )
209
- ax2 = fig .add_axes ( [0.05 , 0.05 , 0.9 , 0.2 ], sharex = ax1 )
210
+ ax1 = fig .add_axes ( [0.15 , 0.38 , 0.70 , 0.50 ] )
211
+ ax2 = fig .add_axes ( [0.15 , 0.18 , 0.70 , 0.20 ], sharex = ax1 )
210
212
else :
211
- ax1 = fig .add_axes ( [0.05 , 0.05 , 0.9 , 0.9 ] )
213
+ ax1 = fig .add_axes ( [0.15 , 0.18 , 0.70 , 0.70 ] )
212
214
ax2 = None
213
215
214
216
avg_days_between_points = (dates [- 1 ] - dates [0 ]) / float (len (dates ))
215
217
216
-
217
218
# Default logic for 'no_xgaps': True for intraday data spanning 2 or more days, else False
218
219
# Caller provided 'no_xgaps' kwarg OVERRIDES default logic.
219
220
0 commit comments