02-13-2015
Gnuplot 3d binning
Hello
I have a text file with tens of thousands of rows
The format is
x y
where both x and y can be anything between -100 and +100.
What I would like to do is have a 3d gnuplot where there are 10,000 squared or bins and each bin will count how many rows have a value that would be assigned to that bin.
So if a row is -50, -50
and then next row is again -50, -50
then the value for that bin would be 2
anybody got any idea how to make script in bash to do this??
I need to count the number of rows with x value between -100 and -99 and y value between -100 and -99....
then count the number of rows with x value between -100 and -99 and y value between -99 and -98
etc
and then is should have a 3 column text file which I cna display in gnuplot.
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi, I am a beginner using UNIX, and was wondering how to use gnuplot from UNIX on my pc. I am connected remotely to my work's UNIX server using Secure Shell Client, and gnuplot won't open a new window when I use the plot command. How do I do this?
Moreover, is it possible to save things from the... (0 Replies)
Discussion started by: KTTFB64
0 Replies
2. Shell Programming and Scripting
Hi everyone!
Can you please help me with some shell scripting?
I have an input file input.txt
It has 3 columns (Time, Event, Value)
Time event Value
03:38:22 A 57
03:38:23 A 56
03:38:24 B 24
03:38:25 C 51
03:38:26 B 7
03:38:26 ... (7 Replies)
Discussion started by: Needhelp2
7 Replies
3. Shell Programming and Scripting
I could not find this on the search..
I want to know how to trim a row
so lets say I have a file that looks like this:
bob 88888888888888
and I want to trim column 2 (lets say 4 off the front and end)
bob 888888
Also, how would I bin column 2
Lets so I want to add and average... (1 Reply)
Discussion started by: phil_heath
1 Replies
4. UNIX and Linux Applications
Hi,
I am trying to make a plot of an ASCII file using GNUplot, but I keep getting error msg:
for example plot filename.txt
It says that (.txt ) is not identified ... I tried to write it without the .txt part, but I also get the error msg.
Any idea why? :confused: (1 Reply)
Discussion started by: cosmologist
1 Replies
5. Shell Programming and Scripting
Hi I have a file that I want to bin.
I am using this code:
awk -F'\t' -v r=40 '{for(i=r;i<=NF;i+=r){for(j=0;j<r;j++){sum+=$(i-j)}printf "%s ", sum/r;sum=0}; printf "\n"}' file1 > file2
So basically what this code does is that it will averaging every 40 columns (creating bins of 40). But... (2 Replies)
Discussion started by: phil_heath
2 Replies
6. Emergency UNIX and Linux Support
Dear All,
I am new to GNUPLOT :D and dont know how it works, but actually there is a LINUX script generated by me which is running & capturing data in real time, the problem is that i want to plot that data in real time using GNUPLOT.:confused:
please help.:wall: (5 Replies)
Discussion started by: jojo123
5 Replies
7. Shell Programming and Scripting
simple question I thought.
How do I setup a chart in gnuplot that draws a "upper threshold" for a given set of data.
I have the graph charting fine. I have peaks and valleys. I can either setup a number that I want to be the "upper threshold". a horizontal line based either in the data,... (5 Replies)
Discussion started by: kag3ythree
5 Replies
8. Shell Programming and Scripting
hi
i have some data like this
input:
1 apples oranges 234
2 oranges apples 2345
3 grapes bananas 1000000
4 melons banans 10000000
5 bananas apples 5000000
6 mangoes banans 2000000
7 apples bananas 1999999
i want to put all those which are coming between 1 and 999999 in to one bin... (8 Replies)
Discussion started by: anurupa777
8 Replies
LEARN ABOUT DEBIAN
tm::coverage
TM::Coverage(3pm) User Contributed Perl Documentation TM::Coverage(3pm)
NAME
TM::Coverage - Topic Maps, Code Coverage
DESCRIPTION
This auxiliary package keeps track of the code coverage. Probably quite irrelevant for a user.
Automatically generated for TM (1.44).
---------------------------- ------ ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod time total
---------------------------- ------ ------ ------ ------ ------ ------ ------
blib/lib/TM.pm 96.4 84.5 58.0 93.7 90.6 27.5 89.6
blib/lib/TM/Analysis.pm 100.0 90.9 n/a 100.0 100.0 0.0 97.5
blib/lib/TM/AsTMa/Fact.pm 100.0 n/a n/a 100.0 n/a 0.0 100.0
blib/lib/TM/AsTMa/Fact2.pm 100.0 n/a n/a 100.0 n/a 0.0 100.0
blib/lib/TM/Bulk.pm 76.8 71.4 62.5 85.7 100.0 0.0 75.3
blib/lib/TM/CTM/CParser.pm 65.6 34.3 31.0 84.6 0.0 1.6 52.5
blib/lib/TM/CTM/Parser.pm 90.9 50.0 n/a 100.0 0.0 0.0 79.4
blib/lib/TM/DM.pm 100.0 65.0 66.7 100.0 n/a 0.0 96.5
blib/lib/TM/Graph.pm 99.1 88.5 n/a 100.0 100.0 0.0 97.4
blib/lib/TM/Index.pm 100.0 80.0 60.0 100.0 83.3 0.3 87.8
.../Index/Characteristics.pm 100.0 100.0 n/a 100.0 0.0 0.0 97.0
blib/lib/TM/Index/Match.pm 98.5 87.5 n/a 100.0 100.0 0.5 97.6
blib/lib/TM/LTM/CParser.pm 84.9 45.3 42.7 98.2 0.0 0.2 67.8
blib/lib/TM/LTM/Parser.pm 95.7 62.5 50.0 100.0 0.0 0.0 87.1
blib/lib/TM/Literal.pm 45.8 0.0 11.8 30.0 0.0 0.4 24.2
blib/lib/TM/MapSphere.pm 96.5 84.6 68.8 100.0 100.0 0.0 91.7
.../TM/Materialized/AsTMa.pm 100.0 n/a n/a 100.0 0.0 0.0 95.5
...ib/TM/Materialized/LTM.pm 100.0 n/a n/a 100.0 0.0 0.0 95.5
.../TM/Materialized/MLDBM.pm 100.0 83.3 n/a 100.0 0.0 0.0 92.6
...b/TM/Materialized/Null.pm 100.0 n/a n/a 100.0 n/a 0.0 100.0
...TM/Materialized/Stream.pm 100.0 100.0 100.0 100.0 0.0 0.0 96.0
...ib/TM/Materialized/XTM.pm 100.0 n/a n/a 100.0 0.0 0.0 96.7
blib/lib/TM/PSI.pm 100.0 n/a n/a 100.0 n/a 0.0 100.0
blib/lib/TM/QL.pm 91.4 61.5 66.7 100.0 50.0 0.1 83.9
blib/lib/TM/QL/CParser.pm 76.2 42.4 41.9 90.3 0.0 9.1 62.0
blib/lib/TM/QL/PE.pm 83.8 77.3 80.0 91.7 0.0 52.5 80.5
blib/lib/TM/QL/TS.pm 65.2 35.4 27.8 70.8 53.3 2.4 56.9
blib/lib/TM/ResourceAble.pm 88.1 87.5 n/a 100.0 100.0 0.0 90.0
.../TM/ResourceAble/MLDBM.pm 100.0 75.0 n/a 100.0 0.0 0.0 94.2
blib/lib/TM/Serializable.pm 94.9 65.6 100.0 100.0 100.0 0.0 84.1
.../TM/Serializable/AsTMa.pm 99.1 87.9 66.7 100.0 100.0 0.0 94.2
...TM/Serializable/Dumper.pm 100.0 n/a n/a 100.0 0.0 0.0 93.5
...ib/TM/Serializable/LTM.pm 94.1 n/a n/a 83.3 100.0 0.0 92.0
...ib/TM/Serializable/XTM.pm 96.3 85.2 72.9 100.0 100.0 0.2 91.5
.../lib/TM/Synchronizable.pm 100.0 75.0 100.0 100.0 100.0 0.0 97.2
...M/Synchronizable/MLDBM.pm 100.0 50.0 n/a 100.0 0.0 0.0 89.3
...nchronizable/MapSphere.pm 100.0 63.6 64.3 100.0 100.0 0.0 88.6
...TM/Synchronizable/Null.pm 100.0 n/a n/a 100.0 0.0 0.0 87.5
blib/lib/TM/Tau.pm 100.0 91.7 80.0 100.0 0.0 0.0 95.6
blib/lib/TM/Tau/Federate.pm 63.2 39.3 n/a 62.5 27.3 0.0 54.5
blib/lib/TM/Tau/Filter.pm 100.0 91.7 66.7 100.0 50.0 0.0 90.0
.../TM/Tau/Filter/Analyze.pm 100.0 n/a n/a 100.0 100.0 0.0 100.0
blib/lib/TM/Tree.pm 100.0 57.1 44.4 100.0 66.7 0.0 88.0
blib/lib/TM/Utils.pm 100.0 50.0 n/a 100.0 0.0 0.0 89.3
...ib/TM/Utils/TreeWalker.pm 100.0 100.0 n/a 100.0 0.0 0.0 96.0
...ib/TM/Workbench/Plugin.pm 100.0 n/a n/a 100.0 0.0 0.0 75.0
...M/Workbench/Plugin/Tau.pm 87.5 50.0 n/a 80.0 0.0 0.0 73.1
yapp/astma-fact.yp 96.9 91.5 73.3 97.8 0.0 4.8 92.7
yapp/astma2-fact.yp 97.4 91.6 58.3 100.0 0.0 0.2 91.6
Total 76.8 45.2 40.2 91.2 57.0 100.0 63.8
---------------------------- ------ ------ ------ ------ ------ ------ ------
SEE ALSO
TM
COPYRIGHT AND LICENSE
Copyright 200[8] by Robert Barta, <drrho@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2008-10-05 TM::Coverage(3pm)