; docformat = 'rst' ;+ ; Batch file containing all the code intended to be typed at the command line ; from the "Introduction" chapter. ;- ; getting started section s = 'Hello world!' print, s PRINT, S help, s x = findgen(361) * !dtor ; 0 < x < 2 pi print, findgen(6) y = sin(x) print, y[0] print, y[0:9] print, y[[0, 90, 180, 270]] plot, x, y plot, x, y, thick=4 plot, x, y, th=4 plot, x, y, t=4 ?print plot, x, y, thick=4, isotropic=1 plot, x, y, thick=4, /isotropic data = read_ascii(file_which('plot.txt'), data_start=2) help, data, /structures plot, data.field1[0, *], data.field1[1, *], xstyle=9, ystyle=8 ; read and display an image endo = read_image(file_which('endocell.jpg')) help, endo window, xsize=615, ysize=416 tv, endo mg_display_imagefile, file_which('people.jpg') iimage, file_which('people.jpg') iimage, read_image(file_which('people.jpg')) ; visualizing 3-dimensional geometry elev = read_binary(file_which('worldelv.dat'), data_type=1, data_dims=[360, 360]) day = read_image(file_which('Day.jpg')) isurface, elev, texture_image=day, anisotropic_scale_3d=0.1 restore, filename=file_which('teapot.dat'), /verbose teapot = obj_new('IDLgrPolygon', transpose([[x],[y],[z]]), $ shading=1, $ poly=mesh, color=[200, 200, 200]) xobjview, teapot obj_destroy, teapot ; more examples demo print, filepath('', subdir=['examples', 'demo'])