LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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

Reply
 
Search this Thread
Old 06-01-2009, 12:29 PM   #1
pgb205
Member
 
Registered: Nov 2007
Posts: 109

Rep: Reputation: 15
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
 
Old 06-01-2009, 01:35 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by pgb205 View Post
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'})
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
matplotlib not displaying graphics in opensuse 10.2 djstrozzi Suse/Novell 0 02-03-2007 11:50 AM
matplotlib rpm OldAl Suse/Novell 2 11-19-2006 01:23 AM
Matplotlib: Need help fixing weird include error Neruocomp Linux - Software 1 09-15-2005 06:56 PM
Graphing TuxFreak Linux - Software 1 02-27-2005 04:29 PM
Graphing AMMullan Linux - Software 1 11-16-2003 01:11 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration