Hi,

  Just started playing with matplotlib and it is very impressive.

  I have a question on controlling the x-axis values being plotted.  
Say I am recording a stock price every hour from say 10am to 3pm on a  
daily basis. I am trying to plot a multi-day chart such that after the  
data for 3pm on Day 1 is plotted, the next data should be for 10am on  
Day 2. Currently matplotlib is automatically adding all the hours from  
3pm on Day 1 till 10pm on Day 2 even if I am only supplying the x-axis  
values that I want to be plotted.

I am doing something like ..

dates = [2008-9-18 10:00, 2008-9-18 11:00, ...., 2008-9-18 15:00,  
2008-9-19 10:00, 2008-9-19 11:00,...]  # all dates are datetime objs
prices = [1.0, 1.1, ...........]

plot_date(dates, prices)
# plot(dates, prices) -- this doesn't work either

Is it possible to force matplotlib to plot only the data points that I  
supply instead of it extrapolating the date data.

-srp


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to