By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,728 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,728 IT Pros & Developers. It's quick & easy.

Re: Taking the floating point distances and plotting histogram

P: n/a
aditya shukla wrote:
I have a program whose output is stored in a text file , say test.txt

After reading this text file i need to extract the float point values
from each line ie , 0.50,0.50, <
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("|")

(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:


Jul 23 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.