IMAGE Function

Specifies a graphic file to use for an image annotation. If no (X1, Y1) coordinates are provided, the image appears in the center of the graph.

Syntax

FUNCTION= “IMAGE”;

Required Variable

IMAGE= “file-name
specifies the image file to be displayed in the graphics output. Include the complete path and filename. The syntax of external file specifications varies across operating environments.
If you do not specify the full path, then the procedure looks for the file in the SAS current working directory. The SAS current directory is the same directory in which you start your SAS session. If you are running SAS with the windowing environment in the Windows operating system, then the current directory is displayed in the status bar at the bottom of the main SAS window.
For a list of image formats that can be used, see Supported File Types for Output Destinations in SAS Output Delivery System: User's Guide.

Optional Variables

ANCHOR= “TOPLEFT” | “TOP” | “TOPRIGHT” | “RIGHT” | “BOTTOMRIGHT” | “BOTTOM” | “BOTTOMLEFT” | “LEFT” | “CENTER”
specifies the anchor position of the annotation. This point is placed on the specified X1 and Y1 positions.
Default:CENTER
BORDER= “TRUE” | “FALSE”
turns the border on and off.
Default:FALSE
DISCRETEOFFSET= numeric-value
specifies an amount to offset the annotation from a discrete value in data space. Specify a value from -0.5 (left offset) to +0.5 (right offset).
Default:0.0 (no offset)
DRAWSPACE= “draw-space-value
specifies the drawing space and units for the annotation. DRAWSPACE can be used rather than specify X1SPACE and Y1SPACE individually.
draw-space-value can be one of the following:
  • DATAPERCENT
  • DATAPIXEL
  • DATAVALUE
  • GRAPHPERCENT
  • GRAPHPIXEL
  • LAYOUTPERCENT
  • LAYOUTPIXEL
  • WALLPERCENT
  • WALLPIXEL
Default:GRAPHPERCENT (unless overridden by a coordinate draw space, such as X1SPACE)
Restriction:For the SGPANEL and SGSCATTER procedures, only GRAPHPERCENT, GRAPHPIXEL, LAYOUTPERCENT, and LAYOUTPIXEL values are valid.
See:For more information about these values, see Drawing Space Values.
HEIGHT= numeric-value
specifies the height of the annotation. Specify a positive number greater than zero. You can use the HEIGHTUNIT variable to specify the unit of measurement.
Default:Determined by the system
HEIGHTUNIT= “DATA” | “PERCENT” | “PIXEL”
specifies the dimension unit to use for the HEIGHT value.
Default:PERCENT
IMAGESCALE= “FIT” | “FITHEIGHT” | “FITWIDTH” | “TILE”
specifies how the image is scaled within the width and height. You can specify the WIDTH and HEIGHT variables.
Default:FITWIDTH or FITHEIGHT if no size or if one size (either the width or the height) is specified (to preserve aspect)

FIT if width and height are both specified

LAYER= “BACK” | “FRONT”
specifies whether the annotation is drawn in front of (FRONT) or behind (BACK) the graph.
Default:FRONT
LINECOLOR= “color” | “style-attribute
specifies a color of the border around the image, if displayed. You can specify a color or a style element attribute. Here is an example of a style attribute:
GraphData2:Color
You can specify colors using the same color schemes that are supported by SAS/GRAPH software. For more information, see Color-Naming Schemes in SAS/GRAPH: Reference.
Default:COLOR attribute in the graph’s current style
LINEPATTERN= “line-pattern
specifies a line pattern of the border around the image, if displayed. You can reference SAS patterns by number or by name. For a list of line patterns, see Line Patterns.
Default:LineStyle attribute in the graph’s current style
LINETHICKNESS= n
specifies the thickness of the border around the image, if displayed. You cannot specify the unit of measure. The default unit of pixels is always used.
Default:LineThickness attribute in the graph’s current style
ROTATE= degrees
rotates the annotation. Specify a number between 0 and 360.
Default:0
TRANSPARENCY= numeric-value
specifies the degree of transparency for the annotation. Specify a value from 0.0 (completely opaque) to 1.0 (completely transparent).
Default:0.0
WIDTH= numeric-value
specifies the width of the annotation. Specify a positive number greater than zero. You can use the WIDTHUNIT variable to specify the unit of measurement.
Default:Determined by the system
WIDTHUNIT= “DATA” | “PERCENT” | “PIXEL”
specifies the dimension unit to use for the WIDTH value.
Default:PERCENT
X1= numeric-value
specifies the X coordinate of the annotation.
Default:none
X1SPACE= “draw-space-value
specifies the drawing space of the annotation’s X coordinate.
draw-space-value can be one of the following:
  • DATAPERCENT
  • DATAPIXEL
  • DATAVALUE
  • GRAPHPERCENT
  • GRAPHPIXEL
  • LAYOUTPERCENT
  • LAYOUTPIXEL
  • WALLPERCENT
  • WALLPIXEL
Default:GRAPHPERCENT
Restriction:For the SGPANEL and SGSCATTER procedures, only GRAPHPERCENT, GRAPHPIXEL, LAYOUTPERCENT, and LAYOUTPIXEL values are valid.
See:For more information about these values, see Drawing Space Values.
XAXIS= “X” | “X2”
specifies which X axis to use for data space annotations.
Default:X
XC1= “text-string”
specifies the character X coordinate of an annotation.
Default:none
Y1= numeric-value
specifies the Y coordinate of the annotation.
Default:none
Y1SPACE= “draw-space-value
specifies the drawing space of the annotation’s Y coordinate.
draw-space-value can be one of the following:
  • DATAPERCENT
  • DATAPIXEL
  • DATAVALUE
  • GRAPHPERCENT
  • GRAPHPIXEL
  • LAYOUTPERCENT
  • LAYOUTPIXEL
  • WALLPERCENT
  • WALLPIXEL
Default:GRAPHPERCENT
Restriction:For the SGPANEL and SGSCATTER procedures, only GRAPHPERCENT, GRAPHPIXEL, LAYOUTPERCENT, and LAYOUTPIXEL values are valid.
See:For more information about these values, see Drawing Space Values.
YAXIS= “Y” | “Y2”
specifies which Y axis to use for data space annotations.
Default:Y
YC1= “text-string”
specifies the character Y coordinate of an annotation.
Default:none