WOLFRAM

Graphics[primitives,options]

represents a two-dimensional graphical image.

Details and Options

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Use lines, polygons, circles, etc. to build up a graphics image:

Out[1]=1

Use plot functions to automatically create Graphics from different types of data:

Out[1]=1
Out[2]=2
Out[3]=3

Scope  (13)Survey of the scope of standard use cases

Primitives  (4)

Graphics primitives are drawn in the order in which they are given in Graphics:

Out[1]=1

Polygons can fold over themselves:

Out[1]=1

Vertices can be shared by using GraphicsComplex:

Out[2]=2

Inset an expression in a graphic:

Out[1]=1

Directives  (5)

Directives can specify color and opacity of faces:

Out[1]=1

Colors, thickness, and dashing directives affect lines, arrows, and edges:

Out[1]=1
Out[2]=2

Some primitives have special directives to specify various properties:

Out[1]=1

Directives can be applied to individual objects using Style:

Out[1]=1

Graphics directives remain in effect only until the end of the list that contains them:

Out[1]=1

Coordinates  (4)

Use an ordinary coordinate system:

Out[1]=1

Specify coordinates by fractions of the plot range:

Out[1]=1

Specify coordinates by fractions of the whole image:

Out[1]=1

Offset coordinates by printer's points:

Out[1]=1

Options  (71)Common values & functionality for each option

AlignmentPoint  (1)

Specify the coordinates within Inset to be aligned with the center of the enclosing graphic:

Out[1]=1
Out[2]=2

AspectRatio  (1)

Use numerical values for AspectRatio:

Out[1]=1

Axes  (2)

Draw all the axes:

Out[1]=1

Draw the axis but not the axis:

Out[1]=1

AxesLabel  (2)

Place a label for the axis:

Out[1]=1

Specify a label for each axis:

Out[1]=1

AxesOrigin  (2)

Determine where the axes cross automatically:

Out[1]=1

Specify the axes' origin explicitly:

Out[1]=1

AxesStyle  (1)

Specify the overall axes style, including the ticks and the tick labels:

Out[1]=1

Specify the style of each axis:

Out[2]=2

Background  (1)

Specify a background color:

Out[1]=1

BaselinePosition  (3)

Align the center of a graphic with the baseline of the text:

Out[1]=1

Specify the baseline of a graphic as a fraction of the height by using Scaled:

Out[1]=1

Use the axis of a graphic as the baseline:

Out[1]=1
Out[2]=2

BaseStyle  (2)

Set the starting style:

Out[1]=1

Set multiple starting styles:

Out[1]=1

ContentSelectable  (3)

Allow the individual graphics objects to be selectable by a single click:

Out[1]=1

No individual object is selectable; the whole graphic appears as one object:

Out[1]=1

The first click selects the whole graphic, and subsequent ones select individual objects:

Out[1]=1

Epilog  (1)

Draw a disk above the graphic, including the axes:

Out[1]=1

FormatType  (3)

By default, expressions are displayed using TraditionalForm in graphics:

Out[1]=1

Display expressions using StandardForm:

Out[1]=1

Labels are also affected by FormatType setting:

Out[1]=1

Frame  (2)

Draw a frame around the whole graphic:

Out[1]=1

Draw a frame on the left and the right edges:

Out[1]=1

FrameLabel  (1)

Specify frame labels for the bottom and the left edges:

Out[1]=1

Specify labels for each edge:

Out[2]=2

FrameStyle  (2)

Specify the overall frame style:

Out[1]=1

Specify the style of each frame edge:

Out[1]=1

FrameTicks  (2)

Put a frame, but no ticks:

Out[1]=1

Tick mark labels on the bottom and the left frame edges:

Out[2]=2

Frame ticks on the bottom and the right edges:

Out[1]=1

FrameTicksStyle  (2)

Specify frame tick and frame tick label style:

Out[1]=1

Specify frame tick style for each edge:

Out[1]=1

GridLines  (3)

Put grids across a 2D graphic:

Out[1]=1

Draw grid lines at specific positions:

Out[1]=1

Specify the style of each grid:

Out[1]=1

GridLinesStyle  (1)

Specify the overall grid style:

Out[1]=1

ImageMargins  (3)

Allow no margins outside of ImageSize:

Out[1]=1

Have 20-point margins on all sides:

Out[1]=1

Leave different margins on each side:

Out[1]=1

ImagePadding  (4)

Leave no padding outside of the plot range:

Out[1]=1

Leave enough padding for all objects and labels that are present:

Out[1]=1

Specify the same padding for all sides in printer's points:

Out[1]=1

Specify different padding on each side:

Out[1]=1

ImageSize  (3)

Use predefined symbolic sizes:

Out[1]=1

Use an explicit image width:

Out[1]=1

Use an explicit image width and height:

Out[1]=1

LabelStyle  (1)

Specify the overall style of all the label-like elements:

Out[1]=1

Method  (4)

"AxesInFront"  (1)

Force axes to be behind drawing primitives:

Out[1]=1

"FrameInFront"  (1)

By default, frames draw in front of graphics primitives:

Out[1]=1

Force the frame to draw behind graphics primitives:

Out[2]=2

"GridLinesInFront"  (1)

Force grid lines to be rendered in front of graphics primitives:

Out[1]=1

"TransparentPolygonMesh"  (1)

By default, polygon meshes double-paint their edges for efficiency reasons:

Out[1]=1

The behavior can be turned off using the "TransparentPolygonMesh" method option:

Out[2]=2

PlotLabel  (2)

Display a label on the top of the graphic in TraditionalForm:

Out[1]=1

Use Style and other typesetting functions to modify how the label appears:

Out[1]=1

PlotRange  (3)

Display all objects:

Out[1]=1

Explicitly choose and ranges:

Out[1]=1

Force clipping at the PlotRange:

Out[2]=2

PlotRange->s is equivalent to PlotRange->{{-s,s},{-s,s}}:

Out[1]=1

PlotRangeClipping  (2)

Allow graphics objects to spread beyond PlotRange:

Out[1]=1

Clip all graphics objects at PlotRange:

Out[1]=1

PlotRangePadding  (3)

Include coordinate unit of padding on all sides:

Out[1]=1

Include padding using Scaled coordinates:

Out[1]=1

Specify different padding on each side:

Out[1]=1

PlotRegion  (3)

The contents of a graphic use the whole region:

Out[1]=1

Limit the contents of the graphic to the middle half of the region in each direction:

Out[1]=1

ImagePadding can also be used to add padding around a graphic:

Out[1]=1

Prolog  (1)

Define a simple graphic to use as a background:

Use it in multiple graphics:

Out[2]=2
Out[3]=3

RotateLabel  (2)

Specify that vertical frame labels should be rotated:

Out[1]=1

Specify that vertical frame labels should not be rotated:

Out[1]=1

Ticks  (3)

Draw the axes but no tick marks:

Out[1]=1

Place tick marks automatically:

Out[1]=1

Draw tick marks at the specific positions:

Out[1]=1

TicksStyle  (2)

Specify the styles of the ticks and tick labels:

Out[1]=1

Specify the styles of and axis ticks separately:

Out[1]=1

Applications  (1)Sample problems that can be solved with this function

Draw a complete graph with 9 vertices:

Out[2]=2

Properties & Relations  (5)Properties of the function, and connections to other functions

The StandardForm of Graphics is its rendered form:

Out[1]=1

The InputForm is the textual expression form:

Graphics can be used as input to functions:

Out[2]=2

Two-dimensional plot functions return Graphics:

Out[1]=1
Out[2]=2

Several integrated data sources return Graphics:

Out[1]=1
Out[2]=2

Many Import and Export formats support Graphics:

Out[1]=1
Out[2]=2

Neat Examples  (2)Surprising or curious use cases

Display an analog clock with current system time:

Out[1]=1

Digital dahlias:

Out[1]=1
Wolfram Research (1988), Graphics, Wolfram Language function, https://reference.wolfram.com/language/ref/Graphics.html (updated 2022).
Wolfram Research (1988), Graphics, Wolfram Language function, https://reference.wolfram.com/language/ref/Graphics.html (updated 2022).

Text

Wolfram Research (1988), Graphics, Wolfram Language function, https://reference.wolfram.com/language/ref/Graphics.html (updated 2022).

Wolfram Research (1988), Graphics, Wolfram Language function, https://reference.wolfram.com/language/ref/Graphics.html (updated 2022).

CMS

Wolfram Language. 1988. "Graphics." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/Graphics.html.

Wolfram Language. 1988. "Graphics." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/Graphics.html.

APA

Wolfram Language. (1988). Graphics. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Graphics.html

Wolfram Language. (1988). Graphics. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Graphics.html

BibTeX

@misc{reference.wolfram_2025_graphics, author="Wolfram Research", title="{Graphics}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Graphics.html}", note=[Accessed: 01-April-2025 ]}

@misc{reference.wolfram_2025_graphics, author="Wolfram Research", title="{Graphics}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Graphics.html}", note=[Accessed: 01-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_graphics, organization={Wolfram Research}, title={Graphics}, year={2022}, url={https://reference.wolfram.com/language/ref/Graphics.html}, note=[Accessed: 01-April-2025 ]}

@online{reference.wolfram_2025_graphics, organization={Wolfram Research}, title={Graphics}, year={2022}, url={https://reference.wolfram.com/language/ref/Graphics.html}, note=[Accessed: 01-April-2025 ]}