;+ ; ; @file_comments ; figure 1: basics plots ; plot and contours ; ; @history ; Sebastien Masson may 2005 ; ; @version ; $Id$ ; ;- PRO tst_basic ; ; 1) plot ; compile_opt idl2, strictarrsubs ; n = 10 y = findgen(n) ; basic plot splot, y, small = [2, 2, 1], /portrait ; improved plot by using plot and "graphic keywords" splot, y, small = [2, 2, 2], /noerase, yrange = [0, (n-1)^2], title = 'x and x^2' oplot, y^2, color = 100, linestyle = 2, thick = 3 ; ; 2) contour ; z = dist(n) ; basic plot scontour, z, /fill, nlevels = 15, small = [2, 2, 3], /noerase ; improved plot by using contour and "graphic keywords" ind = findgen(2*n)/(2.*n) scontour, z, levels = n*ind, c_orientation = 180*ind, c_spacing = .2*ind $ , small = [2, 2, 4], /noerase contour, z, /overplot, c_label = rebin([1, 0], 2, n), levels = n*ind $ , c_charthick = 2, c_charsize = 1.5, c_colors = 250*ind return end