Skip to content

stm.gle

Common subroutines for laying-out STM images

By: Vincent P. LaBella

sub scale_bar llength texth a$ lx ly ap$ line_width text_offset fillpattern$ boxit x_buffer y_buffer

draws a scale bar with text over it

llenght ........ line length

a$.............. text

texth........... texht height

lx.............. x coordinate of box

ly.............. y coordinate of box

ap$............. anchor point (tl,tc,tr,lc,cc,rc,bl,bc,br)

line_width ..... width of line

text_offset .... offset of text from line

fillpattern$.... background

boxit........... =1 draws a black box=0 no box is drawn

x_buffer........ distance on both ends from line to box

y_buffer........ distance on top and bottom

sub textbox x1 y1 ap$ text_size string$ txbuffer tybuffer boxit bgcolor$ fgcolor$ lncolor$ lnwidth
sub axis_dir x1 y1 dx dy x_text$ y_text$ text_height angle text_offset text_ap$

draws and axis x and y and lables it called by axis_box

sub axis_box lx ly textx$ texty$ angle xoffset yoffset axis_length ap$ boxit fgcolor$ bgcolor$ txtcolor$ text_height text_offset

draws a box and puts two axis 90 deg apart and lables them as you want

lx,ly........location of box

textx$.......text to put on x axis

texty$.......text to put on y axis

angle........axis is rotated

xoffset......location of origin relative to corner of box

yoffset......""""""" """ """ """

axis_length..length of axis

ap$..........anchor point (does not work yet puts it at lower left

boxit........1 draws box 0 no box

text_offset....offset of text from axis

sub axis_boxr lx ly textx$ texty$ angle xoffset yoffset axis_length ap$ boxit fgcolor$ bgcolor$ txtcolor$ text_height text_offset

draws a box and puts two axis 90 deg apart and lables them as you want

lx,ly........location of box

textx$.......text to put on x axis

texty$.......text to put on y axis

angle........axis is rotated

xoffset......location of origin relative to corner of box

yoffset......""""""" """ """ """

axis_length..length of axis

ap$..........anchor point (does not work yet puts it at lower left

boxit........1 draws box 0 no box

text_offset....offset of text from axis