468,304 Members | 1,440 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,304 developers. It's quick & easy.

matplotlib for graph script for python

4
Question1:
Expand|Select|Wrap|Line Numbers
  1. #col1    col2     col3            col4
  2. 171.4    130.5    7.2245646       0.3933173
  3. 98.2    133.1    6.8370089      -0.4387156
  4. 4.8    12.8    2.9705532      -1.4150375
  5. 225.1    193.5    7.705306      0.2182325
  6.  
Columns are separated with "\t".

I would like to plot of col3, col4 (from text data file) in order to
get a plot like:
Expand|Select|Wrap|Line Numbers
  1.   y
  2.   1 |
  3.     |          *    *
  4.     |      * *  *    *   *
  5.     0 _ _ *_ _ *__ *_ *_ _ _ _ _
  6.     |    * *  * * *   *  *
  7.     |     *  *   * *     *    *
  8.   -1| ______________________ x
  9.  
How to do it using matplotlib?

Question 2:
I try to make a plot using my column data like lists. Like:

########
Expand|Select|Wrap|Line Numbers
  1. from pylab import *
  2. x = [1.3, 4.5, 5]
  3. y = [2.3, 4.1, 6]
  4. plot(x,y)
  5. xlabel('xaxe')
  6. ylabel('yaxe')
  7. title('Plot name')
  8. plot(x,y,'r',label="Gallup",color='r',linewidth=0,markerfacecolor='g', markeredgecolor='y',marker='d')
  9. legend()
  10. show()
#######
Result: I got back a line plot. I known that is a bad way.
What is the best way for list?
Thanks
Ibra
May 11 '07 #1
3 1658
MMcCarthy
14,534 Expert Mod 8TB
You have posted in the Articles section. I am moving this question to the Python forum.

ADMIN
May 11 '07 #2
bartonc
6,596 Expert 4TB
You have posted in the Articles section. I am moving this question to the Python forum.

ADMIN
Thanks, Mary. Your omnipotent omnipresence is much appreciated in the hectic days.
May 11 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Thanks, Mary. Your omnipotent omnipresence is much appreciated in the hectic days.
LOL - Thats one way of putting it.
May 11 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Noe | last post: by
4 posts views Thread by Matt Feinstein | last post: by
3 posts views Thread by Sam | last post: by
1 post views Thread by redcic | last post: by
4 posts views Thread by John Henry | last post: by
1 post views Thread by Thomas Philips | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.