! Demo with the openline subroutine. ! Author: Francois Tonneau ! This script uses a subroutine defined in another file, openline.gle. ***The ! script won't compile unless the openline.gle file is present, either in the ! same folder or in GLE's folder for custom libraries.*** The latter location ! is defined by the environment variable: ! ! GLE_USRLIB ! ! which you may want to modify to a value of your preference. How to do so will ! depend on your operating system. On systems that run the Bash Unix shell, for ! example, an 'export GLE_USRLIB=...' command will do the job. On Windows, look ! for an 'Advanced System Settings -> Environment Variables' menu. size 14 11 include openline.gle set font ss hei 0.5 amove 2.5 2 begin graph size 8.5 8 fullsize xaxis min -3 max 100 ftick 0 dticks 20 yaxis min -3 max 100 ftick 0 dticks 20 x2axis off y2axis off side off subticks off ticks length -0.2 xtitle "Duration of silent interval (ms)" dist 0.6 ytitle "Percent identification" dist 0.6 data "opening.dat" ! For now, we draw only the markers. The lines will be added below. d1 marker ftriangle msize 0.25 color cadetblue d2 marker ftriangle msize 0.25 color coral d3 marker fcircle msize 0.25 color #004e58 d4 marker fcircle msize 0.25 color #cd5c5c end graph ! We call the openline subroutine (defined in openline.ble) with 0.4 cm as ! diameter of the opening. The other two parameters are line color and line ! width. openline d1 0.4 cadetblue 0.04 openline d2 0.4 coral 0.04 openline d3 0.4 "#004e58" 0.04 openline d4 0.4 "#cd5c5c" 0.04 ! We cover the axes with custom lines: set color black cap square lwidth 0.03 amove xg(0) yg(-3) aline xg(100) yg(-3) amove xg(-3) yg(0) aline xg(-3) yg(100) ! We add an arrow and four labels. Double quotes are employed within single ! quotes so as to be visible on the plot: amove xg(25) yg(40) write '"Gray ship"' set arrowsize 0.35 rmove 0.1 -0.2 aline xg(22) yg(28) arrow end amove xg(85) yg(10) write '"Great ship"' amove xg(35) yg(93) write '"Gray chip"' amove xg(98) yg(63) write '"Great chip"' ! Done. We have learned to use a custom subroutine to draw open lines. We have ! also learned about GLE libraries and the GLE_USRLIB environment variable.