; docformat = 'rst' ;+ ; Batch file containing all the code intended to be typed at the command line ; from the "Using iTools" chapter. ;- ; What are the iTools? isurface, hanning(20, 20) ; iTools basics openr, lun, file_which('damp_sn.dat'), /get_lun sn = bytarr(512) readu, lun, sn free_lun, lun openr, lun, file_which('damp_sn2.dat'), /get_lun sn2 = bytarr(512) readu, lun, sn2 free_lun, lun iplot, sn iplot, sn2, linestyle=2, color=[255, 0, 0], /overplot ; make a legend iplot, sn, name='sn', insert_legend=[0.5, 0.55] iplot, sn2, linestyle=2, color=[255, 0, 0], /overplot, name='sn2', /insert_legend x = findgen(360) * !dtor iplot, x, sin(x), view_grid=[3, 2], yrange=[-2, 2] iplot, x, cos(x), /view_next, yrange=[-2, 2] iplot, x, tan(x), /view_next, yrange=[-2, 2] iplot, x, 1./sin(x), /view_next, yrange=[-2, 2] iplot, x, 1./cos(x), /view_next, yrange=[-2, 2] iplot, x, sin(x)/cos(x), /view_next, yrange=[-2, 2] iplot, cos(x)/sin(x), view_number=6, yrange=[-2, 2] iimage, file_which('endocell.jpg') iplot x = findgen(360) * !dtor y = sin(x) ; Advanced iTools features iplot, randomu(seed, 400) iplot, randomu(seed, 400) iplot, findgen(11) ; Scripting the iTools iplot, findgen(11) print, igetid('plot') print, igetid('view_1/*') mg_ibrowser iopen, file_which('endocell.jpg'), endo, /visualize help, endo iplot, sin(findgen(360) * !dtor) isave, 'test.ps' iplot, findgen(11) plot, data iputdata, 'plot', 2. * findgen(11) iplot, findgen(11), dimensions=[700, 300] print, iconvertcoord(0.5, 0.5, /normal, /to_device) print, iconvertcoord(0.5, 0.5, /normal, /to_data) d = randomu(0L, 2, 100) iplot, d, /scatter, sym_index=1 itext, 'first point', 0.5, 0.1, /normal, font_size=9 textloc = iconvertcoord(0.5, 0.1, /normal, /to_data) ipolyline, [[d[*, 0]], [textloc[0:1]]], /data, arrow_style=2, arrow_size=0.025 isurface, hanning(20, 20) izoom, 2.0 izoom, /reset .run mg_it_isosurfaces_demo .run mg_it_imageplane_demo