This is part of the HicEst documentation

AXIS: Draw 2-Dimensional Axes of Coordinates

A call to the AXIS function can draw up to 8 systems of axes with settings for color, caption, linear/log, grid, time/date, automatic scroll, no axis.

⇾Home ⇾Contents ⇾more Graphics ⇾ Examples

⇾axes_of_coordinates ⇾diagrams ⇾mouse_input ⇾plot_to_script_window ⇾scale_a_graph ⇾scroll_visible_area ⇾xy_system

Optional keywords:
(Syntax of optional keywords)
Axis BaCkcolor Bottom ERror FONt FiXmax FixmiN ForeColor Grid Height Left LoG MaX MiN MouSeAxis MouSeButton MouSeCall MouSeX MouSeY PRint PoinT Scroll TiMe Title WINdowhandle Width Xaxis Yaxis
keyword type mini sample if present, these keywords are always executed first:
WINdowhandle NUM win=wh
  • window to plot to
  • WINDOW(WINdowhandle=w1) ! open a window
  • AXIS(WINdowhandle=w1) ! plot xy default axes nr 1 to window with handle w1
  • to : omit this option or set wh to a non-existent handle. Escape or a click to STOP will restore the script window
  • AXIS() ! default xy axes nr 1 to script window
FONt txt fon='arial' font used for scales and captions
PoinT num pt=10 the font size used for scales and captions
  • AXIS(PoinT=7) ! plot Axis=1 to script window with scales and captions of size 7 points
PRint num pr=prn Used to control printer output, see PRINT
Default without any options
- - -
  • plot to script window without the option WINdowhandle=...
  • on 1st call: x and y scale to -1E6 ... +1E6
  • on subsequent calls: last min/max are remembered
  • both axes are linear
  • black scales and grid on white background
  • scale numbering and grids depend on window size
  • the window is filled, 2 free text lines below and to the left
  • no mouse sensitivity
All following keywords are executed in given sequence:
Axis [=n] a=n
  • start to plot axes of coordinates number n
  • AXIS(Axis=3) ! xy axes nr 3 painted to script window
  • Maximum is 8 diagrams n=1..8, default is 1
  • AXIS(WINdowhandle=w1,a,a,a,a,a,a,a,a) ! plot 8 default diagrams to 1 window with auto numbering
  • Diagrams may be distributed to 1 or more windows in separate calls to AXIS
  • The window is only cleared where painted by AXIS
  • TIME(TO, Excel=today) ! e.g. today=39264.75 (Jul 1, 2007, 18:00)
  • AXIS(MiN=today, MaX=today+20, Grid=7, TiMe='MM/DD')
Set properties of axes and background:
Xaxis [=n] x
  • Xaxis=64 (black+grid) is the default 1st option and need not be set
  • Keywords preceeding Yaxis refer by default to X properties.
  • Properties can also be specified by setting the bit sum for n
  • Xaxis=n sets scale and caption color
  • Yaxis=n sets background color:
  • 0=black, 1=blue, 2=green, 4=red, 8=bright, 16=soft
  • 32=LoG, 64=Grid,128=FixmiN, 256=FixmaX
  • 512=TiMe, 1024=Scroll, 2048=noAxis
  • AXIS(Xaxis=1+64) ! scales and captions are blue, the X axis has grid lines
Yaxis [=n] y Keywords following Yaxis refer to Y properties. If n is set, the color values (see Xaxis) define the background color. Default n=15+64 (bright white + grid)
  • AXIS(X=0, Yaxis= 2+4+32) ! foreground black, background=green+red=yellow, Y axis is logarithmic
MaX num mx=1E4 maximum of axis, default is 1E6 for the 1st call to the current axis. On later calls MiN and MaX are remembered, provided FiXmax is not set.
  • AXIS(MaX=400) ! Xaxis min default, max always 400
MiN num mn=-3 minimum of axis. For defaults see MaX.
  • AXIS(Yaxis, MiN=5.5, MaX=5.8) ! Y scale is 5.5 to 5.8
Title txt t=tit
  • AXIS(Xaxis, Title='XXX', Yaxis, Title='YYY') ! defines captions for X and Y
BaCkcolor num bc=15
  • Set the background color of the current XY-system
  • AXIS(ForeColor=14, BaCkcolor=1) ! brightyellow on darkblue see m" title="Colo
  • AXIS(Backcol= RGB(255,127,63) ! background is 100%red + 50%green + 25%blue
ForeColor num fc=0
  • Set color for axes, scales, captions
  • black (fc = 0) is the default
  • AXIS(ForeColor=1+2) ! axes, scales, captions are cyan
FixmiN [T] fn=0 FixmiN=1 is for special situations where storing the minimum X or Y values is not desirable
FiXmax [T] fx=0 FiXmax=1 is for special situations where storing the maximum X or Y values is not desirable
Grid num g=0
  • Grid allows to draw the most readable linear scales and grid lines
  • Grid=N: major tics are separated by (N-1) minor tics, default is N=10
  • Major tics (grid lines) are labeled whenever space permits
  • Grid<=0: suppress grid, but write scale labels
  • The Grid=... option supersedes the grid bit in X=... or Y=...
  • AXIS(MiN=0, MaX=100) ! grid lines at 0, 10, 20, ..., 100
  • AXIS(MiN=0, MaX=60, Grid=24) ! grid lines at 0, 24, 48
  • AXIS(MiN=-1.8, MaX=-1.5, Grid=8) ! grid lines at --1.76, .1.68, -1.6, -1.52
LoG num lg=0 LoG=0 is a linear scale (default), LoG=n: logarithmic with n decades
  • AXIS(Yaxis, MiN=0, MaX=10, LoG=4) ! default X, logarithmic Y grid lines at 0.001, 0.01, 0.1, 1, 10
Scroll [T] s=0
  • AXIS(Scroll=1, MiN=0, MaX=10) ! X axis scrolls 10 units wide
  • DO x = 0, 100, 0.01 ! do 0 to 100 step 0.01
  •    LINE( x=x, y= SIN(x) ) ! plot sinus(x) with a scrolling Xaxis
TiMe [T] t=1 Time scale axis, units are todays minutes since midnight
  • ! X with 10 hours time scale (default HH:mm), hourly grid lines
  • AXIS(TiMe, MiN=0, MaX=10*60, Grid=60)
txt tm='MM/DD' Date scale axis, units in Excel days (formats see TIME)
  • TIME(TO, Excel=today) ! day_number.fractional_day
  • ! day of the week time scale:
  • AXIS(TiMe='WWW', MiN=today, MaX=today+10)
if only part of the window is to be painted by AXIS:
Bottom num b=3 (lines, counts from bottom). Character units or relative
  • AXIS(Bottom=10) ! 10 free lines below graph
Height num h=1 h=1 is full vertical size
  • AXIS(Height=1/2, Bottom=1/4) ! vertically centered graph
Left num l=1/2 left border. L=1/2 draws graph to right half.
Width num w=30 width of graph. W=30: graph is 30 character columns wide.
get the location and type of in a callback subroutine:
MouSeCall SUB msc='Subnam' Required keyword if the graph (default is Axis=1) is to receive mouse input. Subnam is the name of a callback subroutine.
  • SUBROUTINE Subnam ! global: no arguments allowed
  •    WRITE(Message) x, y ! do whatever is needed
  • END
  • Axis=-nr with nr=1..8 is to set axis parameters only without redrawing:
  • AXIS(Axis=-7, MouSeCall=' ') ! disable mouse input for axis 7, no redraw
  • AXIS(Axis=-5, MouSeCall=subnam) ! enable mouse input(-5: don't redraw axis 5)
MouSeX NUM msx=x to receive x of mouse input in units of Xaxis
MouSeY NUM msy=y to receive y of mouse input in units of Yaxis
MouSeAxis NUM msy=axis_nr returns the clicked axis number
MouSeButton NUM nsb=button_type after a mouse click the variable button_type is
=1(LeftDown), =2(RightDown), =4(LeftUp), =8(RightUp)
  • AXIS(MouSeCall="Subnam", MouSeX=xclick, MouSeY=yclick, MouSeButton=button_type)
ERror LBL er=99 on error jump to label 99

Support HicEst   ⇾ Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.