LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-08-2008, 01:52 AM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
Converting a Histogram data into Scatter Plot data


Hello,

I have a sample data in file which is good for plotting histogram i.e. I have the "Value" column and the "Freq".

Here is the sample data:
Code:
Value	Frequency
10	2
8	2
5	1
4	10
3	8
2	7
1	68
0	2
I am able to plot a histogram with the following gnuplot code:
Code:
set terminal pbm color
set output "hist.pbm"
set title "Latency Histogram"
set xlabel "Number of Data Points"
set ylabel "Latency in usecs"
plot [0:100] [0:10] "hist.dat" with steps

Now I would like to convert this data into a format which will help me in plotting a scatterplot. How can I modify the above gnuplot code or the data file to plot a scatterplot.

I know my explanation or language may not be clear but I would be happy to clarify it.

Any help will be appreciated...Thanks
 
Old 09-08-2008, 10:47 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
As you know, a scatter plot is a plot of response variable vs. explanatory variable. Given your data set, I would presume Value is the response variable and the explanatory variable is missing. I am presuming the "Latency in usec" is in response to something and that something is not reported in your data set.

If you created a scatter plot with your data there would be multiple points one on top of each other. For example, at response value 1, there would be 68 points. It would look like a very bold point, but would still only be one point. A scatter plot with that data would look no different than your bar plot except the bars would be replaced by single point.
 
Old 09-08-2008, 01:19 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by weibullguy View Post
As you know, a scatter plot is a plot of response variable vs. explanatory variable. Given your data set, I would presume Value is the response variable and the explanatory variable is missing. I am presuming the "Latency in usec" is in response to something and that something is not reported in your data set.

If you created a scatter plot with your data there would be multiple points one on top of each other. For example, at response value 1, there would be 68 points. It would look like a very bold point, but would still only be one point. A scatter plot with that data would look no different than your bar plot except the bars would be replaced by single point.

You are right. Actually the column Frequency can also be read as "Number of Cycles"....So for example, in the sample data there are 100 values - each for 1 cycle. So there were 100 cycles in the program and I have value recorded for every cycle. Hope this makes things clear?

Quote:
If you created a scatter plot with your data there would be multiple points one on top of each other. For example, at response value 1, there would be 68 points. It would look like a very bold point, but would still only be one point.
Yes I would like to try that. How can I do that?


Thank you very much for your response..
 
  


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
Converting single disk to RAID5 without loosing data malo_umoran Linux - General 2 03-10-2008 06:19 PM
Converting FAT 32 data from Windows to Linux? agentchange Linux - Newbie 4 05-29-2006 10:22 PM
Converting from NTFS to Fat32 without data loss? thugic Linux - Hardware 10 08-28-2005 05:41 PM
Converting FAT32 to ext3 without data loss Drakkath Linux - General 3 08-22-2005 05:35 AM
converting vfat to ext3 without losing data? nuzzy Linux - General 3 07-01-2002 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:38 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration