473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 1900
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

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

Similar topics

3
by: Noe | last post by:
Hello, I have a problem with finance_work2.py provided in the documentation. I can't find the helpers module : ImportError: No module named helpers Someone could help me? thanks in advance.
3
by: Dr. Colombes | last post by:
On my home laptop computer, I'm trying to install the appropriate modules so that Python version 2.3.3 and IDLE version 1.0.2 (with an "import matplotlib.matlab" statement) can produce nice...
4
by: Matt Feinstein | last post by:
Hi all-- I'm planning to try to do a completely local install of matplotlib (in Fedora Core 1)-- the system administrator isn't going to stop me-- but he isn't going to cooperate either. I've...
3
by: Sam | last post by:
Hello, I'm currently creating a GUI, which consists of a main frame that contains a menu bar,a toolbar and an empty panel, let's call it main_panel. Ideally, I'd like the following...
1
by: redcic | last post by:
I've got a question regarding matplotlib. I use the command: pylab.plot(...) to create a graph. Then, the execution of the code stops after the line: pylab.show() which is off course the last...
4
by: John Henry | last post by:
Has anybody been able to create an exe of their python applications involving matplotlib using pyinstall (ver 1.3)? I am getting a: RuntimeError: Could not find the matplotlib data files when...
1
by: Thomas Philips | last post by:
I have just started using MatPlotLib, and use it to generate graphs from Python simulations. It often happens that the graph is generated and a Visual C++ Runtime Library error then pops up:...
0
by: PamMish1982 | last post by:
Hi all, I have recently started using Python and I am trying to make a GUI out of Tkinter. I am using matplotlib for the graphic purposes. I have to make a exe file from this code. I use py2exe...
3
by: chapagainanish | last post by:
Hi!! I'm having installation problem for installing numpy and scipy in Cygwin for Python, and am obstruct in madway for project, i followed scipy.org guidelines but there's few error thrown as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.