This is part of the HicEst documentation

LINE: Draw Lines and/or Symbols, Contours, Histograms


Line will draw scatter diagrams, line charts, contour lines, histograms, topographic maps etc. to 1 or more coordinate systems generated by AXIS.

⇒Home ⇒Contents ⇒more Graphics

Bookmarks:


  ⇒appearance_of_lines   ⇒bar_charts   ⇒decorate_area   ⇒draw_line   ⇒fill_area   ⇒function_plot   ⇒histograms   ⇒line_drawing_options   ⇒move_pen   ⇒pie_charts   ⇒plot_vector   ⇒poly-line   ⇒step_plot   ⇒text_draw   ⇒topographic_maps

Optional keywords:


(Syntax of optional keywords)
Axis BaCkcolor Color DaSH Draw Line NoLine NoZero OneWay PRint PenUp Points STeps Symbol SymbolDiameter Text X Y lineWidth
optional keyword type mini Basic
(1) values incremented by next Y=.., (2) passed on to next Y=...
X num x=xpos x coordinate to _or_ to (PenUP) (2)
  • LINE(PenUp, x=1, y=82) ! move (invisibly) to (1,82)
  • LINE(x=8, y=4) ! draw from current (x,y) to (8,4)
  • LINE(PenUp, x=0, y=0, x=10, y=100) ! draw from (0,0) to (10,100)
999 x=999 x is set to the most recent x value of this current Line
arr x=xVect x values for _ (2)_
Y num y=ypos y coordinate to draw or move to
  • ! draw 3 lines a, b, c at the same x=xpos:
  • LINE(x=xpos, y=a, y=b, y=c) ! this could be in a DO loop
  • ! ( Colors and Symbols are auto-incremented)
999 y=999 y is set to the most recent y value of this current Line
arr y=yVect y values for a poly-line
  • AXIS() ! draw an all default xy coordinates system
  • yVect = $^2 ! = 1, 4, 9, 16, ...
  • LINE(Y=yVect) ! yVect is plotted versus 1, 2, 3, 4, ...
  • LINE(X=xVect, Y=yVect) ! yVect is plotted versus xVect
Points num p=n Y = f(xpos) with n values in the limits of the current x-axis min/max settings.
  • AXIS( MiN=0, MaX=6, Title="x", Y=14, Title=" SIN(x)" )
  • LINE(X=var, Y= SIN(var), Points=100, Color=1, Width=5)
LINE-Points.png
Line num l=0 line identification number 0...31, default is Line=0. Useful when not all current lines are updated in a single statement. (1)
Axis [1] a=3 axis identification 1....8, default=1, set and drawn by AXIS(). Needed to draw curves in more than 1 xy-system. (2)
Draw ,_,_,_ etc.
BaCkcolor num bc=3.21
  • _and_ enclosed by xVect and yVect
  • BaCkcolor is coded as COLOR.STYLE HATCH
  • e.g. BC=3.21: COLOR=3=cyan, STYLE=2=hatched, HATCH=1=lll
  • for COLOR see m" title="C
  • STYLE: 0=solid, 1=transparent, 2=hatched
  • HATCH: 0=, 1=lll, 2=\\\, 3=///, 4:+++, >4=/\/\
  • the outline of the polygon is set by the Color option
    • SUBROUTINE PlotBar(x, y, ColStyHat)
    • DIMENSION xbar(4), ybar(4)
    • xbar = (x-x/8, x+x/8, x+x/8, x-x/8)
    • ybar = (0, 0, y, y)
    • LINE(X=xbar, Y=ybar, BaCkcolor=ColStyHat, Width=x, Color=x)
    • END
    • AXIS(Grid=1, Y, Grid=1, Height=1/3)
    • CALL PlotBar(1, 9.1, 1.00)
    • CALL PlotBar(3, 8.2, 2.00)
    • CALL PlotBar(5, 6.2, 3.10)
    • CALL PlotBar(8, 4.3, 4.25)
    LINE-BaCkcolor.png
  • An interactive demo of contour plotting is found in Tutorial.hic(Contours). Arrays xvec and yvec are variied in a loop along with colors and LINE is called:
    • LINE(X=xvec, Y=yvec, C=outline_color, BC=fillcolor)
    LINE-XvecYvec.png
Changing the . Options are in effect until changed or until the x-y coordinate system is redrawn by a new call to AXIS(...)
Color num c=1 for color values see m" title="C (1)
  • LINE(Color=16+1, Y=yvec) ! draw yvec soft blue
DaSH num dsh=0 0=solid, 1=--- 2=... 3=-.-.-. 4:-..-.. (works only with lineWidth=1) (2)
  • LINE(DaSH=2, Y=yvec, DaSH=3, Y=zvec) ! draw yvec dotted, zvec dash-dot
lineWidth num w=8 line width, default = 2 (W <= 1 for dashed lines) (2)
  • LINE(lineWidth=12, Color=1, Y=yvec, W=3, C=14, Y=yvec) ! draw blue 12 pixel yvec, fill with yellow 3 pixel yvec
NoLine [T] nl no line drawn between data points. Data points are shown by Symbol only (2)
NoZero [T] nz=1 no plot of y == 0 data to avoid a corrupted graph caused by sparse data (2)
OneWay num ow=-1
  • OneWay=0 (default): connecting line between all data points
  • OneWay=1: a connecting line only if X(n) <= X(n+1)
  • OneWay=-1: a connecting line only if X(n) >= X(n+1)
PenUp [T] pu PenUp or PenUp=1: move only, no draw, PenUp=0: draw (2)
STeps [T] st (2): steplike line between data points, i.e. (X1,Y1) --> (X2,Y1) --> (X2,Y2)
Symbol num s=65 draw symbol at current (x,y):
  • 1=square, 2=diamond, 3=octagon, 4=Xsquare, 5=+diamond, 6=+octagon, 7=triangle up, 8=triangle down, 9=arrow up, 10=arrow down, 11=/, 12=\, 13=X, 14=-, 15=l, 16=+, 17=*,
  • 33...128 ASCII,
  • -1...-255 ASCII symbol of currently selected Windows font (1)
  • LINE(Symbol=- ICHAR('A'), Y=yvec, Y=zvec) ! vector yvec with 'A' symbols, zvec with 'B' symbols
SymbolDiameter num sd=1 Size of symbols, default = 3 (approx. 3 mm) (2)
to x-y graphs:
Text txt t='note' write at X,Y (default: horizontal, left adjust)
  • LINE(X=10, Y=10, Text='start', Draw=2+4) ! move to (10,10), draw text vertical right-aligned
num t=12.3 write "12.3" at position X,Y
Draw num d=type type= +1 (vertical) +2 (right adjust) +4 (pen up) +8 (X,Y in characters from bottom left of frame)
  • LINE(X=5, Y=1.33, Text='1.33 character heights from bottom', Draw=8)

print x-y graphs

:
PRint num pr=1+8 for details see Print



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