1; author: Sylwester Arabas <slayoo@igf.fuw.edu.pl> 2; description: tests designed to be run in parralel with an IDL session to compare plotting results 3; usage: GDL> test_plotting_misc 4 5; helper routine 6pro next 7 null = "" 8 read, prompt="press any key to continue...", null 9end 10 11; main routine 12pro test_plotting_misc 13 14 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 15 ; two bugs when plotting in DATA coordinates with !P.MULTI != 0 (fixed in revs. 1.81 and 1.80 of plotting.cpp) 16 message, /continue, "Testing: !P.MULTI=[0,2,1]&plot,findgen(10)&xyouts,.5,.5,'a'" 17 !P.MULTI=[0,2,1]&plot,findgen(10)&xyouts,.5,.5,'a' 18 next 19 message, /continue, "Testing: !P.MULTI=[0,2,1]&plot,findgen(10)&plots,[0,1],[0,2]" 20 !P.MULTI=[0,2,1]&plot,findgen(10)&plots,[0,1],[0,2] 21 next 22 23 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 24 ; test for "shade_max must exceed shade_min" error messages from plplot (fixed in rev. 1.79 of plotting.cpp) 25 message, /continue, "Testing: contour, fltarr(2, 2) + findgen(4), levels=[5], /fill" 26 contour, fltarr(2, 2) + findgen(4), levels=[5], /fill 27 next 28 message, /continue, "Testing: contour, fltarr(2, 2) + findgen(4), levels=[1,2,3,4], /fill" 29 contour, fltarr(2, 2) + findgen(4), levels=[1,2,3,4], /fill 30 next 31 32 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 33 ; various tests for checking /NODATA, /OVERPLOT, labelling and mapping support in CONTOUR 34 x = 30 * (findgen(5) - 2) 35 y = 30 * (findgen(5) - 2) 36 z = fltarr(5, 5) + findgen(25) 37 38 message, /continue, "Testing: !P.MULTI = [0,0,0] & contour, z, x, y, /nodata" 39 !P.MULTI = [0,0,0] & contour, z, x, y, /nodata 40 next 41 message, /continue, "Testing: !P.MULTI = [0,0,0] & contour, z, /nodata" 42 !P.MULTI = [0,0,0] & contour, z, /nodata 43 next 44 message, /continue, "Testing: !P.MULTI=[0,2,1] & contour, z, x, y, /nodata & contour, z, /nodata" 45 !P.MULTI=[0,2,1] & contour, z, x, y, /nodata & contour, z, /nodata 46 next 47 message, /continue, "Testing: !P.MULTI=[0,1,2] & contour, z, x, y, /nodata & contour, z, /nodata" 48 !P.MULTI=[0,1,2] & contour, z, x, y, /nodata & contour, z, /nodata 49 next 50 51 message, /continue, "Testing: !P.MULTI = [0,0,0] & plot, findgen(100) & contour, z, x, y, /overplot" 52 !P.MULTI = [0,0,0] & plot, findgen(100) & contour, z, x, y, /overplot 53 next 54 message, /continue, "Testing: !P.MULTI = [0,0,0] & findgen(10) & contour, z, /overplot" 55 !P.MULTI = [0,0,0] & plot, findgen(10) & contour, z, /overplot 56 next 57 58 message, /continue, "Testing: !P.MULTI = [0,0,0] & map_set, /conti & contour, z, x, y, /overplot" 59 !P.MULTI = [0,0,0] & map_set, /conti & contour, z, x, y, /overplot 60 next 61 message, /continue, "Testing: !P.MULTI = [0,0,0] & map_set, /conti & contour, rebin(z, 10, 10), /overplot" 62 !P.MULTI = [0,0,0] & map_set, /conti & contour, rebin(z, 10, 10), /overplot 63 next 64 65 ; this is to test how GDL understands regularity of the data (it does not have to be linear!) 66 ; all example below should give the same results! 67 message, /continue, "Testing: !P.MULTI = [0,0,0] & contour, rebin(z, 10, 10)" 68 !P.MULTI = [0,0,0] & contour, rebin(z, 10, 10) 69 next 70 message, /continue, "Testing: contour, rebin(z, 10, 10), rebin(x, 10), rebin(y, 10), /overplot" 71 !P.MULTI = [0,0,0] & contour, rebin(z, 10, 10), rebin(x, 10), rebin(y, 10) 72 next 73 message, /continue, "Testing: contour, z, x, y, /overplot" 74 !P.MULTI = [0,0,0] & contour, z, x, y, /overplot 75 next 76 77 message, /continue, "Testing: !P.MULTI = [0,2,1] & map_set, /grid & contour, z, /overplot & contour, z" 78 !P.MULTI = [0,2,1] & map_set, /grid & contour, z, /overplot & contour, z 79 next 80 message, /continue, "Testing: !P.MULTI=[0,1,2] & map_set,/stereo & contour,z,x,y,/over & map_set,/adv,/gnomic & contour,z,x,y,/over" 81 !P.MULTI=[0,1,2] & map_set,/stereo & contour,z,x,y,/over & map_set,/adv,/gnomic & contour,z,x,y,/over 82 next 83 84 erase 85 86 message, /continue, "Testing: !P.MULTI=[0,1,2] & map_set,/stereo,/grid & contour,z,x,y,/over & map_set,/adv,/gnomic,/grid & contour,z,x,y,/over" 87 !P.MULTI=[0,1,2] & map_set,/stereo,/grid & contour,z,x,y,/over & map_set,/adv,/gnomic,/grid & contour,z,x,y,/over 88 next 89 90 message, /continue, "Testing: !P.MULTI=[0,1,2] & map_set,/stereo,/grid & contour,z,x,y,/over,/fill & map_set,/adv,/gnomic,/grid & contour,z,x,y,/over,/fill" 91 !P.MULTI=[0,1,2] & map_set,/stereo,/grid & contour,z,x,y,/over,/fill & map_set,/adv,/gnomic,/grid & contour,z,x,y,/over,/fill 92 next 93 94 message, /continue, "Testing: !P.MULTI = [0,0,0] & contour, z, /follow" 95 !P.MULTI = [0,0,0] & contour, z, /follow 96 next 97 98end 99