473,387 Members | 1,504 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,387 software developers and data experts.

Re: Taking the floating point distances and plotting histogram

aditya shukla wrote:
I have a program whose output is stored in a text file , say test.txt
eg.
0\9\10\11|0.50|c:\windows\apppatch/AcLayers.dll
0\9\10\11|0.50|c:\windows\apppatch/AcRedir.dll
0\9\10|0.66|c:\windows\apppatch/AcSpecfc.dll
0\9|0.83|c:\windows\apppatch/iebrshim.dll

After reading this text file i need to extract the float point values
from each line ie , 0.50,0.50,0.66.0.83 <http://0.66.0.83respectively
in this case, till the end of the file is reached and then i need to
plot a histogram based on these values .
Extracting is easy; you can do something like

data = []
for line in open("test.txt"):
line = line.split("|")
data.append(float(line[1]))

(or maybe use the csv module with a custom separator)

Plotting is a bit different -- there are many ways to do that, depending
on where and how you want to display that histogram (on a website, in a
window on your machine, in a PDF file, ...), but most solutions require
additional libraries. Here's one such library:

http://matplotlib.sourceforge.net/

</F>

Jul 23 '08 #1
0 1023

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Oracle3001 | last post by:
Hi All, I am trying to use JAI to build a histogram of an image i have. I have posted the code below, and the error I get at runtime. I have taken the code from the offical java examples, so I am...
9
by: Dr. Colombes | last post by:
What is the easiest way to generate some plots and graphs in Python ? Specifically interested in simple histograms and scatter plots with circles and regression lines. Thanks for your...
3
by: bchaillou | last post by:
Hello I've got a question about plotting data on either access or excel. This is what is buggin me. I've got a series of data fields that needs to be plotted Their values are coming from...
10
by: Shawn | last post by:
Hello all, I apologize as I am sure this has probably been dealth with before... but I am doing an exercise from "Practical C Programming" and I have been unable to get it to work perfectly due to...
1
by: Hul Tytus | last post by:
comp.lang.c converting a point known by 4 distances to xyz coordinates? Amongst all the librarys on the internet there is certainly source for a routine that converts a point known by 4...
1
by: wayne | last post by:
i want to plot a line graph. The values that I obtain are the RGB value of a TIFF image. i m plotting RGB values vs value(1,2,3..) so when generated the RGB values, there will b a column of values...
27
by: G Patel | last post by:
Hello, I'm having trouble with floating point problems. I'm trying to write a function that calculates the distance between two cartesian points (integer coordinates). I have the function...
14
by: amitsoni.1984 | last post by:
hi, I have some values(say from -a to a) stored in a vector and I want to plot a histogram for those values. How can I get it done in python. I have installed and imported the Matplotlib package...
0
by: Kurt Smith | last post by:
On Fri, Jul 25, 2008 at 5:02 PM, aditya shukla <adityashukla1983@gmail.comwrote: the 'bins' argument to pylab.hist() is supposed to be an integer or a list of the bins' lower edges. The default...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.