Note that there are some explanatory texts on larger screens.

plurals
  1. POIpython / pylab / matplotlib plotting error
    primarykey
    data
    text
    <p>I've installed Enthought's EPD (64 bit for Windows 7).</p> <p>I'm trying to plot historical stock quote data using Yahoo's API. All the code I'm trying to use is on this blog post: <a href="http://www.traineetrader.com/importing-stock-data-from-yahoo-using-python/" rel="noreferrer">http://www.traineetrader.com/importing-stock-data-from-yahoo-using-python/</a></p> <p>The ystockquote.py file works fine.</p> <p>But the second script to plot Google's historical stock quote doesn't work for me. This is the code (from the website):</p> <pre><code>import ystockquote # Get Quotes 01/01/2006 - 01/01/2009 GOOG = ystockquote.get_historical_prices('GOOG', '20060101', '20090101') # Create empty lists, quick and dirty GOOGOpen = [ ] GOOGClose = [ ] GOOGDate = [ ] GOOGHigh = [ ] GOOGLow = [ ] GOOGAdj = [ ] GOOGVolume = [ ] # Populate lists from downloaded data for i in range(1, 755): GOOGDate.append(GOOG[i][0]) GOOGOpen.append(GOOG[i][1]) GOOGHigh.append(GOOG[i][2]) GOOGLow.append(GOOG[i][3]) GOOGClose.append(GOOG[i][4]) GOOGVolume.append(GOOG[i][5]) GOOGAdj.append(GOOG[i][6]) plot(GOOGAdj) title("Google Adjusted Close") ylabel(r"GOOG Closing Price ($USD)", fontsize = 12) xlabel(r"Date", fontsize = 12) grid(True) </code></pre> <p>I get the following error:</p> <pre><code>NameError: name 'plot' is not defined </code></pre> <p>Any tips on what I'm doing wrong? Or how to get this to run? If I include "from pylab import *" at the top of the code, I don't get the error, but nothing happens.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload