Sponsored Content
Full Discussion: Gnuplot 3d binning
Top Forums Shell Programming and Scripting Gnuplot 3d binning Post 302935223 by garethsays on Friday 13th of February 2015 01:50:11 PM
Old 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

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
deckorean(5)							File Formats Manual						      deckorean(5)

NAME
deckorean - A character encoding system (codeset) for Korean DESCRIPTION
The DEC Korean (deckorean) codeset consists of the following character sets: ASCII KSC 5601-1987 For the symbols and ideographic characters defined in the KSC 5601-1987 character set, DEC Korean uses 2-byte data representation. For ASCII characters, DEC Korean uses single-byte 7-bit data representation; that is, the most significant bit (MSB) of the byte that repre- sents an ASCII character value is always set off. For more information on the ASCII character set, refer to ascii(5). KSC 5601-1987 Characters KSC 5601-1987 is a national standard that defines a primary set of graphic characters for Korean information interchange. The standard defines a character set with a total of 8224 characters that are arranged in a code table. The code table has 94 rows, numbered from 1 to 94. Each row has 94 columns, also numbered from 1 to 94. Different kinds of characters occupy different areas of the code table as follows: Special characters: 986 graphic symbols that reside in rows 1 to 12 Hangul characters: 2350 Korean (Hangul) characters that reside in rows 16 to 40 Hanja characters: 4888 Chinese characters that reside in rows 42 to 93 DEC Korean Encoding Values To differentiate KSC 5601-1987 codes from ASCII codes, the most significant bit (MSB) of both the first and the second byte of a KSC 5601 character value is always set on. The value of a KSC 5601 character can be determined from its row and column number as follows: 1st byte = A0 + Row number 2nd byte = A0 + Column number For example, if a character is positioned at the first column of the 36th row, its value is CA41, which is calulated as follows: 1st byte = A0(hex) + 36 = C4 (hex) 2nd byte = A0(hex) + 01 = A1 (hex) Codeset Conversion The following codeset converter pairs are available for converting Korean characters between deckorean and other encoding formats. Refer to iconv_intro(5) for an introduction to codeset conversion. For more information about the other codeset for which deckorean is the input or output, see the reference page specified in the list item. eucKR_deckorean, deckorean_eucKR Converting from and to Korean Extended UNIX Code: eucKR(5). UCS-2_deckorean, deckorean_UCS-2 Converting from and to UCS-2 format: Unicode(5). UCS-4_deckorean, deckorean_UCS-4 Converting from and to UCS-4 format: Unicode(5). UTF-8_deckorean, deckorean_UTF-8 Converting from and to UTF-8 format: Unicode(5). There are also codeset converters that convert between the Microsoft Korean code-page format (cp949) used on PC systems and UCS-2, UCS-4, and UTF-8 formats. Note that if the UCS-2, UCS-4, or UTF-8 output from these converters is then converted to DEC Korean, some Hangul char- acters may be lost. For more information, see code_page(5). DEC Korean Fonts The operating system provides Korean fonts for both screen display and printers. The following bitmap fonts are available in various sizes and typefaces for 75dpi and 100dpi display devices: Fonts in Gotic Family: -adecw-gotic-medium-r-normal--16-160-75-75-m-160-ksc5601.1987-1 -adecw-gotic-medium-r-normal--24-240-75-75-m-240-ksc5601.1987-1 -adecw-gotic-medium-r-normal--16-160-100-100-m-160-ksc5601.1987-1 -adecw-gotic-medium-r-normal--24-240-100-100-m-240-ksc5601.1987-1 Fonts in Myungcho Family: -adecw-myungcho-medium-r-normal--16-160-75-75-m-160-ksc5601.1987-1 -adecw-myungcho-medium-r-nor- mal--32-320-75-75-m-320-ksc5601.1987-1 -adecw-myungcho-medium-r-normal--24-240-75-75-m-240-ksc5601.1987-1 -adecw-myungcho-medium-r- normal--16-160-100-100-m-160-ksc5601.1987-1 -adecw-myungcho-medium-r-normal--24-240-100-100-m-240-ksc5601.1987-1 -adecw-myungcho- medium-r-normal--32-320-100-100-m-320-ksc5601.1987-1 Fonts in Screen Family: -adecw-screen-medium-r-normal--18-180-75-75-m-160-ksc5601.1987-1 -adecw-screen-medium-r-normal--24-240-75-75-m-240-ksc5601.1987-1 -adecw-screen-medium-r-normal--18-180-100-100-m-160-ksc5601.1987-1 -adecw-screen-medium-r-nor- mal--24-240-100-100-m-240-ksc5601.1987-1 -adecw-screen-medium-r-normal--18-180-100-100-m-160-ksc5601.1987-1 -adecw-screen-medium-r- normal--24-240-100-100-m-240-ksc5601.1987-1 For PostScript printers, the operating system provides only Munjo fonts. For general information on printing non-English text, refer to i18n_printing(5). SEE ALSO
Commands: locale(1) Others: ascii(5), code_page(5), i18n_intro(5), i18n_printing(5), iconv_intro(5), l10n_intro(5), eucKR(5), Korean(5), Unicode(5) deckorean(5)
All times are GMT -4. The time now is 12:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy