![]() | ![]() |
![]() | ![]() |
Noted that the almost never used commands XROW and YROW (to plot
data by-colum and not by-line as normally done by XCOL and YCOL
commands) work no more. I've also noted that some error holds at the very early
stage of the process. If you look at the figure in the (e.g.) XROW manual page,
can see that the process correctly worked until 2003. Something must be gone lost in
the next evolution of some basic command.
I do not
know why it does happen, given that the same procedure holds in by-line
process and there it works fine. Another bug: on July 28, 2017 I noted that it can be read only the first 12 columns of an integer data file, the remaining columns beeing set to 9999. So if you have a dataset with less than 12 columns, can use also integer numbers, else you must translate your integers into reals. SORRY! |
Franco Zavatti
zavattifranco@gmail.com
day measure n,x val n x val n x val 235 138 235 235 138 235 235 138 236 999 236 236 130 236 237 130 237 130 the old version gave 237 237 140 the new one 237 238 140 238 140 238 238 145 238 240 145 239 999 240 145So, in the old version abscissa didn't correspond any more to the day of the year (DOY). Introduced the new P1 values 1, 2, 3 (or not 1 and 2). P1=1 works for data where x-values are explicit; P1=2 when XCOL 0; P1=3 when a single data row must be masked.
Added commands:
Added commands:
It also runs
under Windows. Actually it is compiled and works on a
Windows 7 HP TC4400 tablet PC and runs on a Windows 7 PC without
Fortran compiler. I'm not able to run Bongo under Windows 10.
® PostScript is a registered trademark of Adobe Inc. USA
Bongo commands are shown in chapter 8, with the number of parameters (9 means string) and one-line description. The commands are listed into the file CMDS.BGO (cmds.bgo in Linux), and Bongo routines validate a given command by comparing the input line to the content of this file. So, attribute of CMDS.BGO (and/or cmds.bgo) should be set to read only and the file not modified in any case.
Linux
export BGODIR=/home/bongo
alias bongo='/home/bongo/bongo' | |
Windows
read file-name.bon
playback
end
re file-name
pl
end
As output on the screen, some
information appears after PL and, as
last output, the prompt '>' informs the user that the command END, OFF or
QUIT must be given.
After the command END, the message bongo.ps has been written on
disk appears and
Bongo stops.
Now a PostScript viewer like Ghostview, GV, GSView can show the graph and
print the hardcopy. If the Xwindow system has not been loaded, the display
of the output file can be obtained by a direct call to GhostScript, like
e.g.
gs -sDEVICE=linux -r640x480x16 bongo.ps
As can be derived from the manual page of ghostscript (man gs),
-rrowsxcolumnsxcolors is the screen resolution, whose default value is
1024x768x256.
Examples of Bongo output are shown in Figs. 9 -- 18 (Figs. 1 -- 8 refer to the no more supported MS-DOS version and are not shown here).
Font size can be changed in Bongo by the command TEXT, setting the first parameter ("dim") to 0 for 6-pixel, to 1 for 9-pixel, to 2 for 15-pixel or 3 for 24-pixel characters of the Times-Roman font. With TEXT "dim" parameter set to 4÷7 the other available font, Helvetica, can be selected (see Figs.11 TR and H as an example of such fonts or this table association between "dim" and fonts and with an example about text rotation angle). For a direct comparison between Helvetica (left) and Times Roman fonts, see here.
Greek alphabet is available with the following limitation: any greek
character is given by the corresponding latin character following the
backslash symbol ('\' or ascii 92 Decimal). So, please don't use the
backslash character followed by a letter if you do not need a greek
symbol.
The correspondence between
latin and greek letters is shown in Fig.10 or here.
Also exponents and deponents (like an or an) are available in the
same way as greek letters, ^(ascii 94D) and _(ascii 95D) beeing,
respectively, the adopted special characters.
Mathematical symbols (see a list here) like (±, °, ≥, ≤, ≠, ÷,
∞, Σ), not present on
the keyboard, can be written by the special symbol '|' (ascii 124D) followed
by two characters (as |pm or |PM for plus/minus symbol; |gr or
|de for degrees symbol;|ge, |le, |ne, |up, |in, |su. A
more general expression could be: \a|de|pm\b|de i.e
α°±β° or
(\a|pm\b)|gr i.e.(α±β)°, where 'gr' is the italian
translation (gradi) of
the english term 'degrees' used in the first expression)
The above special symbols (^, _ and |) can be written by the special
sequences ^^, __, ||. Doubling the symbol allows to write the special
character (e.g. "file__name.ext" gives "file_name.ext",
"2^^5" gives "2^5" and "and||or" gives "and|or"). See this example:
text 1 10
reloc 1890 15.30
label from: www.earthpolicy.org/Indicators/Temp/2008__data.htm#fig1
where the underscore in the label has been doubled and the result is in the
red upper label here.
Program received signal SIGSEGV: Segmentation fault - invalid memory reference. Backtrace for this error: #0 0x7F11B27B3E48 #1 0x7F11B27B2FD0 #2 0x7F11B1EE42EF #3 0x40AB4E in gnv_ #4 0x415BAD in exc_ #5 0x403409 in MAIN__ at bongops.f:? Segmentation fault (core dumped)you have mixed integer, real, exponential values in a column. Please control and homogenize (within a column data MUST be all integer, real, or exponential, but not mixed. I think only a disturbed person can mix data types: also, it is easier to produce an homogeneous than a non-homogeneous file). I find mixed data type in some meteorological dataset and in Excel files.
RGB | 1 | ! uses RGB color space. RGB 0 is gray-tones |
---|---|---|
COLOR | 15 | |
WLINE | 0.5 | |
DIGITS | 1 1 | |
LIMITS | 0 1.5 -8,1 | !space and comma at the same time |
LTICKS | 3 9 | |
STICKS | 5 5 | |
BOX | 1 1 | |
CLABEL | foc f/96 PSF | |
XLABEL | R(arcsec) | |
YLABEL | \m (mag/arcsec^2) | !greek letter ![]() |
% plot | ||
GRID | 4 8 2 | |
DATA | plotter.dat | ! This is a comment |
LINES | 16,76 | |
XCOLUMN | 1 | |
YCOLUMN | 2 | |
FILL | ! fill any closed symbol | |
PTYPE | 6 5 4 | !circle (6), 5 pixels radius,color 4 |
LTYPE | 0 0 | |
POINTS | ||
RELOCATE | 0.8,-1 | |
DOT | ||
NOFILL | !stop filling | |
RELOCATE | 0.85,-1 | |
LABEL | circles | |
% new plot | ||
YCOLUMN | 3 | |
LTYPE | 1 2 | |
CONNECT | ||
RELOCATE | 0.75 -2.5 | |
DRAW | 0.85 -2.5 | |
RELOCATE | 0.90 -2.5 | |
LABEL | 3 Gauss fit | |
% new plot | ||
YCOL | 4 | |
LTYPE | 0 0 | |
PTYPE | 1 2 11 | |
POINTS | ||
% labels and comments | ||
RELOCATE | 0.8 -5 | |
TEXT | 3 9 | |
LABEL | 3 GAUSS FIT | |
TEXT | 1 15 | |
RELOCATE | 1.32 0 | |
LABEL | (O-C) | |
RELOCATE | 0.8 -1.7 | |
DOT | ||
RELOCATE | 0.85 -1.7 | |
LABEL | crosses | |
relocate | 0.4 -11.4 | |
label | Fig.3 - Output of TEST.BON | |
id | FZ |
Command | # Pars. | Description [# Pars.=9 means "string"] |
---|---|---|
BANDX | 2 | vertical rectangle with base p1,p2 user coords. |
BANDY | 2 | horizontal rectangle with base p1,p2 user coords. |
BBB | 0 | displays the 1.st 20 columns of BBB(7000,50). Used only for debugging. |
BIN | 2 | bins data vector. Needs nbin, bin width |
BOX | 2 | draws box. If p1 or p2=0 no values |
CIRCLE | 3 | draws e circle:radius p1;s-angle p2; e-angle p3 40 |
CLABEL | 9 | writes a comment, 40 chars max, at top left |
COLOR | 1 | sets drawing color to 'col' |
COLUMNS | 2 | first and last column in the data file |
CONNECT | 0 | connects data points by line LTYPE |
CONTINUE | 0 | continues to process the Bongo command file |
CONTOUR | 0 | draws iso-curves, after levels.dat |
CONVERT | 3 | converts bongo.ps to pdf,png,jpg,gif. p1=ext; p2=alpha; p3=dpi. Def val.=0 |
CORR | 1 | computes auto-correlation function(1) or correl. coeff.(2). Def.val: 2 |
COS | 4 | computes cosine function:p1=amp;p2=period;p3=start abscissa;p4 end absissa |
DATA | 9 | opens and reads data_file as 80 chars strings |
DELETE | 2 | deletes lines n1 to n2. Re-arrange the list. |
DELTA | 2 | % axis length of first x,y ticks |
DERIV | 0 | numerical derivatives of YV from diff(YV)/diff(XV) |
DIGITS | 2 | defines the number of decimal digits for x and y axes |
DOS | 0 | runs an Operating System commad |
DOT | 0 | draws at current point a symbol defined by ptyper |
DRAW | 2 | draws from current point to X,Y |
DUMMY | 0 | internal use only (% and ! will be translated into this command) |
EBAR | 1 | computes and displays error bars |
EDIT | 1 | edits the command line # n ->, space ,RE |
ELLIPSE | 5 | draws an ellipse:p1 s-major;p2 b/a;p3 rot;p4 s-angle;p5 e-angle |
END | 0 | exits (from Ins or from Bongo) to DOS |
ERASE | 0 | clears graphic screen |
EXCOL | 2 | assigns to EXV column # n of data file. Drawing flagged |
EXDIFF | 1 | Forward or Backward differences o EXV vector, P1 flag =1 forward; =-1 (default) backward. |
EXOPER | 2 | applies opcode and constant to EXV |
EXP | 3 | computes yv(i)=p1*exp(xv(i)*p2), p3 beeing the # of data (KMAX) |
EXSAVE | 0 | saves on disk the last EXV vector |
EYCOL | 2 | assigns to EYV column # n of data file. Drawing flagged |
EYDIFF | 1 | Forward or Backward differences o EYV vector, P1 flag =1 forward; =-1 (default) backward. |
EYOPER | 2 | applies opcode and constant to EYV |
EYSAVE | 0 | saves on disk the last EYV vector |
FILL | 0 | sets filling ability ON |
FIT | 2 | polynomial fit (max degree = 6). Weights (1) or not (0) |
FT | 4 | Fisher's test between 2 samples variances |
FONT | 9 | loads new font file |
GAUSS | 2 | computes standard normal distro |
GRID | 3 | draws grid: pattern, color, flag (=1 small ticks) |
HELP | 9 | displays help of a command (name); lists commands (none) |
HISTO | 3 | draws histogram with bin width, color, flag |
KS | 0 | computes K-S test on XV and YV samples of equal size |
IDENT | 9 | writes date, time, 2 chars user-id on top right. |
INFO | 0 | information about Bongo, References, Author's address. |
INPUT | 9 | data input from keyboard. Write a disk file |
INSERT | 1 | inserts command AFTER line #n of command buffer |
JUMP | 0 | jumps to the first occurrence of the command CONTINUE |
KS | 0 | compute K-S non parametric test |
LABEL | 9 | writes text at last-defined cursor position (current point) |
LAST | 1 | define the last n data to be plotted (def=300) |
LIMITS | 4 | limits of the plot in user coordinates |
LINES | 3 | first,last line and step of data vector |
LIST | 0 | lists the command buffer |
LOMB | 3 | LOMB power spectrum |
LTICKS | 2 | number of main (large) ticks on x, y axis |
LTYPE | 2 | sets line shape and color |
MACRO | 9 | executes macro file_name |
MEM | 3 | MEM power spectrum |
MEMO | 1 | range for moving average |
MODE | 1 | sets graphic mode to n |
NOFILL | 0 | sets filling OFF |
NOISE | 1 | computeS noise (1=uniform; 2=default)=gaussian; 3= exponential) and write EYV vector |
OFF | 0 | close bongo.ps but not Bongo. Like END |
PAUSE | 0 | stops execution of command buffer. Hit a key to restart |
PBOX | 2 | defines origin of BOX in screen coordinates |
PCOM | 0 | displays data of Plotpe and Bongo common blocks |
PHYSICAL | 4 | defines screen coords of box XS, XE, YS, YE |
PLAYBACK | 0 | executes actual command buffer |
POINTS | 0 | draws points at current point and change it |
POW | 3 | computes y(i)=p1*xv(i)**p2, p3 beeing the # of data (or KMAX) |
PTYPE | 3 | defines symbol: shape, dimension, color |
QUIT | 0 | like END, does not write the logo |
READ | 9 | reads file with command list |
RECT | 4 | draws rectangle from user coords. p1,p2=left bottom;p3,p40right top coords |
RELOCATE | 2 | sets current point to x, y (user coords.) |
RESET | 0 | sets parameters to original values as in bconfig.plt |
RGB | 1 | 1/0=color/black&white drawing |
RIMA | 9 | reads matrix from file-name |
SAVE | 1 | saves on disk-file savenn.sav all available save.nn files |
SCALOG | 2 | sets log-scale on x- or y-axis, or on both |
SIN | 4 | computes sine function:p1=amp;p2=period;p3=start abscissa;p4 end abscissa |
SLIN | 4 | computes line: p1,p2=intercept and slope;p3=start abscissa;p4 end abscissa |
SMOOTH | 1 | smooths YV vector with window= step |
SORT | 0 | sorts XV, re-arranges YV |
STAIRS | 2 | draws stair-like histogram. Color, flag |
STICKS | 2 | sets small ticks number for X and Y axis |
TEXT | 3 | sets text dimension, color, angle or default values |
TTEXT | 9 | sets text type at alpha (A) or graphic (G) mode |
VERSION | 1 | output Bongo version number |
VWRITE | 2 | displays on screen of the last XV,YV,EXV,EYV from p1 to p2 |
WCOMM | 2 | save comment from line p1 to line p2 |
WLINE | 1 | defines the drawing line width (real numbers) ONLY PS |
WRIMA | 0 | write matrix on screen |
WRITE | 9 | writes command buffer on disk - file |
XAXIS | 1 | length of x-axis (pixels) |
XCOLUMN | 1 | assigns column #n to internal vector XV |
XGRID | 3 | draws X-axis (vertical) grid |
XDIFF | 1 | Forward or Backward differences of XV vector, P1 flag =1 forward; =-1 (default) backward. |
XLABEL | 9 | defines x-axis label |
XOPER | 2 | applies operation #m, with constant c, to xcol |
XROW | 1 | assigns row #n to internal vector XV |
XSAVE | 0 | saves on disk the last XV vector |
XSORT | 0 | sort XV and rearrange YV |
XSTAT | 0 | saves on disk n,mean,std.dev.,var,3.rd & 4.th moment of XV |
XYSTAT | 0 | save on disk n,mean,std.dev.,var,3.rd & 4.th moment of XV |
XZERO | 1 | draws a line at X=value from YMIN to YMAX |
YAXIS | 1 | length of y-axis in pixels |
YCOLUMN | 1 | assigns column #n to internal vector YV |
YDIFF | 1 | Forward or Backward differences of YV vector, P1 flag =1 forward; =-1 (default) backward. |
YGRID | 3 | draws Y-axis (horizontal) grid |
YLABEL | 9 | defines y-axis label |
YOPER | 2 | applies operation #m, with constant c, to ycol |
YROW | 1 | assigns row #n to internal vector YV |
YSAVE | 0 | saves on disk-file the last YV vector |
YSORT | 0 | sort YV and rearrange XV |
YSTAT | 0 | saves on disk n,mean,std.dev.,var,3.rd & 4.th moment of YV |
YZERO | 1 | draws a line at Y=value from XMIN to XMAX |
SCIRC | 1 | screen coordinates. Draw circle of radius ir at current point |
SMOVE | 2 | screen coordinates. Define current point in pixel. The same as SRELOCATE |
SRECT | 2 | screen coordinates. Draw rectangle left bottom at current point right top ix,iy |
SRELOCATE | 2 | screen coordinates. Define current point in pixel. |
![]() |
---|
A video illustrates the WCOMM 99 command: flv (44MB).