next up previous 241
Next: A simple CL procedure
Up: Creating Complex Plots
Previous: Creating Complex Plots

A simple ICL procedure

A simple procedure that reproduces the tutorial example looks like:

proc icltest file
   begplot xw
   readf data=(file) xcol=1 ycol=3 all reset
   dlimits
   boxframe
   points 3
   label 'X axis' 'Y axis' 'PLOT TITLE'
   endplot
endproc
If you enter this text into a file say called icltest.icl and use the following commands from ICL:
ICL > load icltest
ICL > icltest (TUTORIAL_DATA)
The data from the tutorial example will be plotted as before. One immediate advantage of this method is that we can now plot data from columns 1 and 3 of any file.

If the contents of the procedure are wrong or need a slight modification then you can edit the procedure from ICL. Try the command:

ICL > edit icltest
This puts you into an editor and you can modify the procedure. (If you haven't set an environment variable EDITOR or used the ICL command set editor, you'll find yourself in vi. To exit from this type the command :q and now use the set editor command.) If you made a modification to the procedure this can be viewed using the command:
ICL > list icltest
All the currently available procedures are shown using the command:
ICL > procs
If you do modify a procedure from ICL use the:
ICL > save icltest
command to write out your changes (you should use the name of your procedure instead of icltest).

next up previous 241
Next: A simple CL procedure
Up: Creating Complex Plots
Previous: Creating Complex Plots

PONGO [2exof Applications for Interactive Data Plotting [2exon 2.0-2
Starlink User Note 137
Paul Harrison, Paul Rees,
Peter Draper, Alasdair Allan
27 March 2008
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council