This is really basic stuff but I had some problems navigating in the
matplotlib website (*if anyone is interested, I'll list those issues at the
end). I want to simply plot dates. After reading the tutorial, I just
don't understand how to do it.
I will have lists of dates in the format like 2007-09-01 12:00:02 and a list
of corresponding values. I would like to make a simple line graph with
markers at the data points and axis markers at reasonable intervals such as
each day or each week. My questions are:
1. What exactly must I import (which modules) and how do I import them (in
the sense of "import x" vs. "from x import y")?
2. What arguments does the plot_date() command take and what is format of
the arguments?
3. Do I have to make the conversion from the date format above to the
matplotlib date format? If so, how?
As an example how would I make a line plot with markers for this data?:
x = (2007-09-01 12:00:02, 2007-09-02 12:00:02, 2007-09-03 12:00:02)
y = (10, 20, 30)
Thanks.
--------------------------------------------
*the issues I had with navigating or figuring this out on my own:
Broken links on two of the functions:
http://matplotlib.sourceforge.net/datetime.html
http://matplotlib.sourceforge.net/dateutil.html
In the tutorial, under the dates section, the drange command is used but it
isn't clear which module has to be imported for it to work. I tried it with
matplotlib and Python's datetime module and it didn't work.
In the date_demo1.py and dat_demo2 in the examples, date is gotten from the
quotes_historical_yahoo module calling up Yahoo's stock quotes. The problem
for me was I wasn't sure which format the arguments were in that this
quotes_historical_yahoo() returns.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users