I got this error in my python script:
%matplotlib inline import numpy as np import matplotlib.pyplot as plt from utils import progress_bar_downloader import os #Hosting files on my dropbox since downloading from google code is painful #Original project hosting is here: https://code.google.com/p/hmm-speech-recognition/downloads/list #Audio is included in the zip file link = 'https://dl.dropboxusercontent.com/u/15378192/audio.tar.gz' dlname = 'audio.tar.gz' if not os.path.exists('./%s' % dlname): progress_bar_downloader(link, dlname) os.system('tar xzf %s' % dlname) else: print('%s already downloaded!' % dlname)
I want to use matplotlib, but it gives a syntax error, I tried sudo apt-get install python-matplotlib
if you are not using Jupyter IPython for the laptop, just comment out (or delete) the line, everything will work fine, and a separate graph window will open if you run your python script from the console.
If you are not using a Jupyter IPython laptop, the very first python code cell in your laptop should have the string "% matplotlib inline" so you can view any plot.
"% matplotlib inline" python, script.
, Jupyter? , , .
% matplotlib inline - , Jupyter IPython. inline Jupyter show(). IPython - , , IPython , . , , Jupyter.
. Shift + Enter, .
In []: %matplotlib inline
Python, Python, ( Jupyter ).
, jupyter, "% matplotlib inline" python show() , .
%matplotlib Spyder., , Series, new_obj, , :
%matplotlib
new_obj
import matplotlib.pyplot as plt new_obj.resample('M').sum().plot(kind="bar") plt.show()
Source: https://habr.com/ru/post/1654334/More articles:single column list to columns in R - rIs there a way to disable X-Frame settings from the URL of SSRS Report Manager? - tomcatMysql characters - Emoji in the database - mysqlCan I use the notification "com.apple.springboard.lockcomplete"? - iosCustom authentication method for Flask-Security - pythonHow to use TextInputLayout with Theme.material? - javaRun Spark-shell with an error: SparkContext: SparkContext initialization error - hadoopFacing NoSuchMethodError for io.netty.util.AttributeKey.valueOf () method with grpc and protobuf Hello world example - javaWhat is the name of this method? - delphiКакая версия Dokka идет с какой версией Kotlin? - mavenAll Articles