function plotit (xmin, xmax, ymin, ymax, vel=T, temp=T, factor=1.91, xlbl = "X", ylbl = "Y", toplbl = "Plot", file ="plot.ps") { # # function to produce a standard spectrum plot. # # R. Prestage 9th September 2002 # # Assumes a new invocation of pgplotter has been started, using: # # 'include pgplotter.g' # pg := pgplotter() # # The plot will be plotted in the new plotter, and you will be prompted # from the glish command line whether to plot it or not. # # Dish must be running, and the required spectrum must have been got # into globalscan1, either by doing a d.getc() or d.plotc(). # # Arguments are: # # xmin - minimum x value for the plot (Freq in MHz or velocity in km/s) # xmax - maximum x value # ymin - minimum y value for the plot (Ta* or Jy) # ymax - maximum y value # # vel - if true, x axis is velocity, else frequency, default velocity # temp - if true, y axis is Ta*, else Jy (scaled by factor), default Ta* # factor - scaling factor in K/Jy, default 1.91 # # xlbl - x label # ylbl - y label # toplbl - top label # file - name for postscript file to produce pg.clear() # get the axes if (vel) { x := d.getvfarray().v } else { x := d.getvfarray().f x := x/1000000.0 } y := d.uniget('globalscan1').data.arr[1:1,] if (temp == F) { y := y / factor } # set the plot size and character size # pg.vstd() pg.pap(6.0, 0.7) pg.sch(2.0) # box and plot pg.env(xmin,xmax,ymin,ymax,0,0) pg.lab(xlbl,ylbl,toplbl) pg.line(x,y) pg.postscript(file,color=F,landscape=F) }