I have read tons of questions on this, but I am still baffled. I'm running Anaconda in Scientific Linux. I launche a console a type ipython qtconsole
.
My script.py
is something like
import matplotlib.pyplot as plt
plt.plot([1,2,3,4,5,6,7,8,9,10])
plt.show()
I type run script.py
from the qtconsole, and the program just sits and does nothing. What am I doing wrong? I have been using the qtconsole for running my scripts, maybe it's better for really being interactive with and I should be running my scripts some other way?
Any general advice on workflow would be very helpful here. When should I use python script.py
, when should I use ipython script.py
, and when should I use the qtconsole, etc...?
This seems like a Magic Function problem
More specifically %matplotlib . %matplotlib inline
will show it within the browser, or you can replace inline
with whatever you feel better for your use.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.