This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Graphics

Updated In 6 Graphic
Graphics[primitives, options]
represents a two-dimensional graphical image.
  • The following graphics primitives can be used:  »
Arrow[{{x1,y1},...}]arrow
Circle[{x,y},r]circle
Disk[{x,y},r]filled disk
Inset[obj,...]inset object
GraphicsComplex[pts,prims]complex of graphics objects
GraphicsGroup[{g1,g2,...}]objects selectable as a group
Line[{{x1,y1},...}]line
Locator[{x,y}]dynamic locator
Point[{x,y}]point
Polygon[{{x1,y1},...}]polygon
Raster[array]array of gray or colored squares
Rectangle[{xmin,ymin},{xmax,ymax}]rectangle
Text[expr,{x,y}]text
  • The following graphics directives can be used:  »
AbsoluteDashing[{w1,...}]absolute line dashing specification
AbsolutePointSize[d]absolute point size specification
AbsoluteThickness[w]absolute line thickness specification
Arrowheads[specs]arrowheads specification
CMYKColor[c,m,y,k]color specification
Dashing[{w1,...}]line dashing specification
Directive[g1,g2,...]composite graphics directive
EdgeForm[g]edge drawing specification
FaceForm[g]face drawing specification
GrayLevel[i]intensity specification
Hue[h]hue specification
Opacity[a]opacity specification
PointSize[d]point size specification
RGBColor[r,g,b]color specification
Thickness[w]line thickness specification
  • The following wrappers can be used at any level:
Annotation[obj,label]give an annotation
Button[obj,action]make obj act as a button
Dynamic[obj]use the dynamically updated current value
EventHandler[obj,...]attach an event handler
Hyperlink[obj,URI]make obj a hyperlink
Mouseover[obj,over]specify a mouseover form
PopupWindow[obj,cont]attach a popup window
StatusArea[obj,label]specify a label to appear in the status area
Style[obj,opts]specify a style
Tooltip[obj,label]attach a tooltip
  • The following options can be given:
AlignmentPointCenterthe default point in the graphic to align with
AspectRatioAutomaticratio of height to width
AxesFalsewhether to draw axes
AxesLabelNoneaxes labels
AxesOriginAutomaticwhere axes should cross
AxesStyle{}style specifications for the axes
BackgroundNonebackground color for the plot
BaselinePositionAutomatichow to align with a surrounding text baseline
BaseStyle{}base style specifications for the graphic
ContentSelectableAutomaticwhether to allow contents to be selected
DisplayFunction$DisplayFunctionfunction for generating output
Epilog{}primitives rendered after the main plot
FormatTypeTraditionalFormthe default format type for text
FrameFalsewhether to put a frame around the plot
FrameLabelNoneframe labels
FrameStyle{}style specifications for the frame
FrameTicksAutomaticframe ticks
FrameTicksStyle{}style specifications for frame ticks
GridLinesNonegrid lines to draw
GridLinesStyle{}style specifications for grid lines
ImageMargins0.the margins to leave around the graphic
ImagePaddingAllwhat extra padding to allow for labels, etc.
ImageSizeAutomaticthe absolute size at which to render the graphic
LabelStyle{}style specifications for labels
MethodAutomaticdetails of graphics methods to use
PlotLabelNonean overall label for the plot
PlotRangeAllrange of values to include
PlotRangeClippingFalsewhether to clip at the plot range
PlotRangePaddingAutomatichow much to pad the range of values
PlotRegionAutomaticthe final display region to be filled
PreserveImageOptionsAutomaticwhether to preserve image options when displaying new versions of the same graphic
Prolog{}primitives rendered before the main plot
RotateLabelTruewhether to rotate y labels on the frame
TicksAutomaticaxes ticks
TicksStyle{}style specifications for axes ticks
  • Nested lists of graphics constructs can be given. Directive specifications such as GrayLevel normally remain in effect only until the end of the list which contains them.  »
  • A list containing only graphics directives is treated as if its elements were directly inserted into an enclosing list.
  • Style[obj, opts] can be used to apply the options or directives opts to obj.  »
  • The settings for BaseStyle are appended to the default style typically given by the "Graphics" style in the current stylesheet. The settings for AxesStyle, LabelStyle, etc. are appended to the default styles given for "GraphicsAxes", "GraphicsLabel", etc.
  • Graphics[] gives an empty graphic with the default image size.
New in 1 | Last modified in 6