Sponsored Content
Full Discussion: Gnuplot 3d binning
Top Forums Shell Programming and Scripting Gnuplot 3d binning Post 302935241 by DGPickett on Friday 13th of February 2015 03:44:54 PM
Old 02-13-2015
Are the values fractional nn.nnnnnn, so they need to be truncated to int before counting? I assume they are in text, being space and line separated. Examples are nice. Still, with x and y ranges of 201 integers, that is 40K+ pairs. You can run it through sed to remove the fractions and then sort and uniq to count.
Code:
sed 's/\.[0-9]*//g' in_file|sort|uniq -c > out_file

f course, values like '.123456' will disappear, so I hope they are '0.123456', else sed needs to force the zero.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with gnuplot

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

Sampling and Binning- Engineering problem

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

trimming and binning rows

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

GNUplot

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

Binning rows while skipping the first column

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

GNUPLOT help needed

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

gnuplot horizontal

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

problem in binning the data

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
PS_SET_TEXT_POS(3)							 1							PS_SET_TEXT_POS(3)

ps_set_text_pos - Sets position for text output

SYNOPSIS
bool ps_set_text_pos (resource $psdoc, float $x, float $y) DESCRIPTION
Set the position for the next text output. You may alternatively set the x and y value separately by calling ps_set_value(3) and choosing textx respectively texty as the value name. If you want to output text at a certain position it is more convenient to use ps_show_xy(3) instead of setting the text position and call- ing ps_show(3). PARAMETERS
o $psdoc - Resource identifier of the postscript file as returned by ps_new(3). o $x - x-coordinate of the new text position. o $y - y-coordinate of the new text position. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Placing text at a given position <?php $ps = ps_new(); if (!ps_open_file($ps, "text.ps")) { print "Cannot open PostScript file "; exit; } ps_set_info($ps, "Creator", "rectangle.php"); ps_set_info($ps, "Author", "Uwe Steinmann"); ps_set_info($ps, "Title", "Text placement example"); ps_begin_page($ps, 596, 842); $psfont = ps_findfont($ps, "Helvetica", "", 0); ps_setfont($ps, $psfont, 8.0); ps_show_xy($ps, "Some text at (100, 100)", 100, 100); ps_set_value($ps, "textx", 100); ps_set_value($ps, "texty", 120); ps_show($ps, "Some text at (100, 120)"); ps_end_page($ps); ps_delete($ps); ?> SEE ALSO
ps_set_value(3), ps_show(3). PHP Documentation Group PS_SET_TEXT_POS(3)
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy