python 2.7 - %matplotlib inline ValueError -


when use %matplotlib inline in program, valueerror. error mean, , how can resolve it?

here error:

traceback (most recent call last): file "main.py", line 40, in <module> ct.iloc[:-1,:-1].plot(kind='bar',stacked=true,color=['red','blue'],grid='false') file "/usr/lib/python2.7/dist-packages/pandas/tools/plotting.py", line  1735, in plot_frame plot_obj.generate() file "/usr/lib/python2.7/dist-packages/pandas/tools/plotting.py", line 907, in generate self._adorn_subplots() file "/usr/lib/python2.7/dist-packages/pandas/tools/plotting.py", line  1012, in _adorn_subplots ax.grid(self.grid) file "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 2176, in grid b = _string_to_bool(b) file "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 54, in _string_to_bool raise valueerror("string argument must either 'on' or 'off'") valueerror: string argument must either 'on' or 'off' 

when asking question should follow these guidlines: https://stackoverflow.com/help/mcve instead of posting traceback.

that said tracebacks can useful , following yours you'll able figure out problem.

using final line of traceback can useful. 1 of string arguments passing should 'on' or 'off'. based on can @ grid option boolean option.

i tested so:

%matplotlib inline import matplotlib.pyplot plt plt.plot([23,4],[4,6]) plt.grid('false') 

giving same error got. fix should use either grid = 'off' or grid = false options. in example above change plt.grid('off')


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -