GPLOT recipes: Creating a simple colour plot
device pcpsfile/myplot.psThe commands listed below can be entered at the COMMAND= prompt manually or can be read from a command file with command input myfile.txt (or whatever you called your command file). The set is called model508seg and the subset is PARAM 7 (but the PARAM axis was the last axis of the set and we omitted the axis name). With command location the plot starts at 30 mm from the left and 20 mm from the bottom of the device (e.g. of the X11 window or the plot on paper). The command box without numbers assumes that you want to display the entire subset. Note that scaling needs to be specified in both x and y direction. Scales are in grids/mm. Instead of xscale and yscale, we used the size commands xsize and ysize.
inset model508seg 7 ! Name of the input set and number of subset location 30 20 ! Origin of plot box ! Define limits of the frame xsize 120 ! Plot width is 120 mm ysize 85 ! Plot height is 85 mm xmargin 2 ! 2 mm between plot and left or right axis ymargin 2 ! 2 mm between plot and top or bottom axis pause ! Press a key to continue executing ! Not needed if commands are entered manuallyIf the above commands were read from a command file then GPLOT is pausing after pause (note that if commands are entered manually, pause is not necessary) and it is time to display your set with VIEW and adjust colours etc. in GIDS until you are satisfied with the result. At that moment the command getlut freezes the colours and colour scaling. The command colplot dumps the GIDS contents to the selected output device, But only if that device was is a so called PostScript colour printer or -file.
getlut colplotThe colour dump must be made before drawing other things like contours, because in PostScript it is possible to plot text or lines over an existing colour or gray scale image, but the opposite is NOT true.
charhei 3 ! Character height 3 mm axdelta 20 HMSSEC ! Step size for RA axis (20 hmssec = 20*15 arcsec) axpos * 10 16 0 ! Start main label at 10h16m0sec axformat hMS ! Plot always minuts and seconds in RA labels axis bp ! Plot the bottom axis in physical coordinates axtitle ! Plot a title under the bottom axis axpos * 45 35 0 ! Dec axis start position 45d35m0s axdelta 5 arcmin ! Major tick separation 5 min. of arc axis lp ! Label left axis with physical coordinates axtitle ! Default title for this axis axis t axis rThe contours and the title of the plot are plotted last. Plotting is finished only after the close command. The name of the created file is written in the log file.
levels 10:120:20 ! Select countour levels 10 to 120, step 20 conto ! Draw the contours font italic ! Select italics font charhe 5 ! Set char. height to 5 mm toplabel MODEL 18 ! Write label on top close ! Close the plotThe PostScript file myplot.ps resides on disk. Outside Hermes it can be inspected with GhostScript or GhostView and sent to a colour printer with a Unix command like:
lpr -Pcps myplot.psIt could have been sent directly to a colour printer if you selected: