Share your knowledge at the LQ Wiki.
 Home Forums HCL Reviews Tutorials Articles Register Search Today's Posts Mark Forums Read
 LinuxQuestions.org matplotlib--graphing against time
 Programming This forum is for all programming questions. The question does not have to be directly related to Linux and any language is fair game.

Notices

 06-01-2009, 12:29 PM #1 pgb205 Member   Registered: Nov 2007 Posts: 122 Rep: matplotlib--graphing against time let say i have two arrays time_array=[00:00:00,00:00:10...17:59:50,18:00:00] and data_array=[1,12..34,2] both of them with the same number of elements. I want to graph data_array on y axis vs time_array on x_axis. However, I'm unable to do this using matplotlib because it complains time_array is not in numeric form. I guess I should do plot=(data_array) and somehow mark the x axis with time at periodic intervals. Anyone can suggest how to do this exactly? thanks
06-01-2009, 01:35 PM   #2
Sergei Steshenko
Senior Member

Registered: May 2005
Posts: 4,481

Rep:
Quote:
 Originally Posted by pgb205 let say i have two arrays time_array=[00:00:00,00:00:10...17:59:50,18:00:00] and data_array=[1,12..34,2] both of them with the same number of elements. I want to graph data_array on y axis vs time_array on x_axis. However, I'm unable to do this using matplotlib because it complains time_array is not in numeric form. I guess I should do plot=(data_array) and somehow mark the x axis with time at periodic intervals. Anyone can suggest how to do this exactly? thanks

http://www.mathworks.com/access/help...p=mss&ei=UTF-8 ->

Specifying Tick-Mark Location and Labeling ->

Code:
```set(gca,'XTick',-pi:pi/2:pi)
set(gca,'XTickLabel',{'-pi','-pi/2','0','pi/2','pi'})```

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post djstrozzi SUSE / openSUSE 0 02-03-2007 11:50 AM OldAl SUSE / openSUSE 2 11-19-2006 01:23 AM Neruocomp Linux - Software 1 09-15-2005 06:56 PM TuxFreak Linux - Software 1 02-27-2005 04:29 PM AMMullan Linux - Software 1 11-16-2003 01:11 AM

All times are GMT -5. The time now is 06:46 PM.

 Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap -