Reference Guide > Graphics and Plotting Keywords > Device Keyword
  

Device Keyword
Used With Routines:   AXIS,   BAR3D,   CONTOUR,   CONTOURFS,   CONTOUR2,    OPLOT, PLOTPLOTS,   POLYFILLSHADE_SURF,   SHADE_SURF_IRR,   SURFACE,   XYOUTS
Corresponding System Variable: None.
Express coordinates in device coordinates. When used with AXIS, CONTOUR, CONTOUR2, OPLOT, PLOT, SHADE_SURF, and SURFACE, this keyword specifies that the Position and Clip coordinates are in device units.
Example
The following code displays an image contained in the variable A and then draws a contour plot of pixels (100:499, 100:399) registered over the pixels:
; Display the image.
status = DC_READ_8_BIT(!Data_dir + 'whirlpool.img', img)
WINDOW, Xsize=512, Ysize=512
TV, img 
; Draw contour plot, specify the coordinates of the plot,
; in device coordinates, do not erase, set the X and Y
; axis styles to Exact.
CONTOUR, img(100:399, 100:399), Position=[100,100, 399,399], $
   /Device, /Noerase, XStyle=1, YStyle=1
Note that in the above example, the keyword specification /Device is equivalent to Device = 1.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.