Open jinpengchina opened 7 years ago
plt.switch_backend('newbackend') -----------------err ???
If you look at the error, 'ValueError: Unrecognized back end string "newbackend"' It tells you. Valid strings are 'pdf', 'pgf', 'Qt4Agg', etc. "newbackend" is not a valid argument.
I tried putting all the values in the table for running it on an Ubuntu distro.... it just freeezes at terminal no output anyone has working code for this?
have you tried a smaller CSV file, i. e. less training data? If there are no "errors" - maybe you're just not waiting for it to finish? (happened to me)
is the same error
Traceback (most recent call last):
File "demo.py", line 7, in <module>
plt.switch_backend('newbackend')
File "/home/sky/anaconda2/lib/python2.7/site-packages/matplotlib/pyplot.py", line 230, in switch_backend
matplotlib.use(newbackend, warn=False, force=True)
File "/home/sky/anaconda2/lib/python2.7/site-packages/matplotlib/__init__.py", line 1351, in use
name = validate_backend(arg)
File "/home/sky/anaconda2/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 232, in validate_backend
return _validate_standard_backends(s)
File "/home/sky/anaconda2/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 70, in __call__
% (self.key, s, list(six.itervalues(self.valid))))
ValueError: Unrecognized backend string "newbackend": valid strings are [u'pgf', u'cairo', u'MacOSX', u'CocoaAgg', u'gdk', u'ps', u'GTKAgg', u'nbAgg', u'GTK', u'Qt5Agg', u'template', u'emf', u'GTK3Cairo', u'GTK3Agg', u'WX', u'Qt4Agg', u'TkAgg', u'agg', u'svg', u'GTKCairo', u'WXAgg', u'WebAgg', u'pdf']
If you have mac os, then In demo.py write plt.switch_backend('macosx') instead of plt.switch_backend('newbackend')
Or you can try these options:
GTKAgg
GTK3Agg
GTKAggGTKCairo
GTK3Cairo
WXAgg
WX
TkAgg
Qt4Agg
Qt5Agg
macosx
If none of them works, just try to install someone http://matplotlib.org/faq/usage_faq.html#what-is-a-backend
Here you can check the modifications I've made to solve it : https://github.com/machinelearning-spain/predicting_stock_prices/commit/c47785fcb168290d7c34c495731eb7c325170b63
Im getting the same on a Ubuntu VM on MacOS
It just freezes in ubuntu..any idea how to make it work?
Guys, if you have issues with MAC OS, try to use this repo I modified https://github.com/machinelearning-spain/predicting_stock_prices
If your data set is large and if you are using a PC, it may take awhile for your PC to present the data. Just give it some time to do its gucciness and the data will show (mine took 20 mins). Also, make sure your backend represents the appropriate argument needed to function.
less data: about 5~10 items works for me