PSHISTOGRAM

Section: Misc. Reference Manual Pages (l)
Updated: DATE
Index Return to Main Contents
#ifdef SI #define UNIT cm #define LEN 0.75 #define SCALE -Jx0.75/0.01 #else #define UNIT inch #define LEN 0.3 #define SCALE -Jx0.3/0.01 #endif  

NAME

pshistogram - Bin data and plot histograms  

SYNOPSIS

pshistogram file -Jxxscale[/yscale] -Wbin_width [ -2 ] [ -Btickinfo ] [ -C ] [ -Eazimuth/elevation ] [ -Gfill ] [ -H ] [ -I ] [ -K ] [ -Lpen ] [ -O ] [ -P ] [ -Q ] [ -Rwest/east/south/north ] [ -S ] [ -U[/dx/dy/][label] ] [ -V ] [ -Xx-shift ] [ -Yy-shift ] [ -Ztype ] [ -ccopies ]  

DESCRIPTION

pshistogram reads the first column from file [or standard input] and calculates histogram parameters based on the bin-width provided. Using these parameters, scaling, and optional range parameters it will generate PostScript code that plots a histogram. A cumulative histogram may also be specified.
file
Input filename. If no file is given, pshistogram will read standard input.
-Jx
xscale[/yscale] (Linear scale(s) in UNIT/unit).
-W
Sets the bin width used for histogram calculations.
 

OPTIONS

No space between the option flag and the associated arguments. #include "explain_-b.txt"
-2
Read second rather than first column.
-C
Center bin on each value. [Default is left edge].
-E
Sets the viewpoint's azimuth and elevation (for perspective view) [180/90]
-G
Select filling of bars. Set the shade (0-255) or color (r/g/b) [Default is 0/0/0]. #include "explain_-H.txt" #include "explain_-K.txt"
-L
Draw bar outline using the specified pen thickness. [Default is no outline]. #include "explain_-O.txt" #include "explain_-P.txt"
-Q
Draw a cumulative histogram. #include "explain_-R.txt" If not given, pshistogram will automatically find reasonable values for the region.
-S
Draws a stairs-step diagram instead of histogram. #include "explain_-U.txt" #include "explain_-V.txt" #include "explain_-XY.txt"
-Z
Choose between 4 types of histograms: 0 = counts [Default], 1 = frequency_percent, 2 = log10 (1.0 + count), 3 = log10 (1.0 + frequency_percent). #include "explain_-c.txt"
 

EXAMPLES

To draw a histogram of the data v3206.t containing seafloor depths, using a 250 meter bin width, center bars, and draw bar outline, try:

pshistogram v3206.t -W250 -C -L2 -V > plot.ps

If you know the distribution of your data, you may explicitly specify range and scales. E.g., to plot a histogram of the y-values (2nd column) in the file errors.xy using a 1 meter bin width, plot from -10 to +10 meters @ LEN UNIT/m, annotate every 2 m and 100 counts, and use black bars, try:

cut -f2 errors.xy | pshistogram -W1 -R-10/10/0/0 SCALE -B2:Error:/100:Counts: -G0 -V > plot.ps

Since no y-range was specified, pshistogram will calculate ymax in even increments of 100.  

SEE ALSO

gmt, psbasemap, psrose, psxy #include "refs.i"


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 07:11:20 GMT, January 07, 2025