({{, (RefLink[Frame, paclet:ref/Frame])
is an option for (RefLink[Graphics, paclet:ref/Graphics]), (RefLink[Grid, paclet:ref/Grid]), and other constructs that specifies whether to include a frame. }})

OpenersNotesSection(Spacer1)Details

The following basic settings can be given:

For (RefLink[Graphics, paclet:ref/Graphics]), (RefLink[Plot, paclet:ref/Plot]), and related functions, (RefLink[Frame, paclet:ref/Frame])->{{left,right},{bottom,top}} specifies whether to draw a frame on each edge. With the default setting (RefLink[FrameTicks, paclet:ref/FrameTicks])->(RefLink[Automatic, paclet:ref/Automatic]), ticks are included whenever a frame is drawn.

For (RefLink[Grid, paclet:ref/Grid]) and related constructs, lists of settings can be given. Common cases include:

General settings for (RefLink[Frame, paclet:ref/Frame]) in (RefLink[Grid, paclet:ref/Grid]) and related constructs can be given as:

The (Subscript[spec, k]) can have the following forms:

With settings of the form {(Subscript[s, 1]),(Subscript[s, 2]),…,{…},(Subscript[s, m]),…,(Subscript[s, n])}, if there are more (Subscript[s, i]) specified than items across the grid, (Subscript[s, i]) from the beginning are used for the first items, and ones from the end are used for the last items.

Rules of the form {{(Subscript[i, min]),(Subscript[i, max])},{(Subscript[j, min]),(Subscript[j, max])}}->v can be used to specify frames for regions of a grid.

OpenersPrimaryExamplesSection(Spacer1)Examples  (28)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Draw a frame around a plot:

Plot[Sin[x],{x,0,10},Frame->True]

Put a frame on the left and right edges:

Plot[Sin[x],{x,0,10},Frame->{{True,True},{False,False}}]

Put a frame around a grid:

Grid[Table[x,{4},{7}],Frame->True]

Frame all elements in the grid:

Grid[Table[x,{4},{7}],Frame->All]

Specify overall frame style, including frame ticks and frame tick labels, using (RefLink[FrameStyle, paclet:ref/FrameStyle]):

Plot[Sin[x],{x,0,10},Frame->True,FrameStyle->Directive[Orange,12]]

OpenersExampleSection1(Spacer1)Scope  (9)

OpenersExampleSubsection0(Spacer1)Frame Positions  (2)

Put a frame on the top and the bottom edges:

Plot[Sin[x],{x,0,10},Frame->{{False,False},{True,True}}]

Put a frame on all the columns:

Grid[Table[x,{4},{7}],Frame->{All,False}]

Put a frame on all the rows:

Grid[Table[x,{4},{7}],Frame->{False,All}]

OpenersExampleSubsection1(Spacer1)Frame Styling  (2)

Specify the style of each frame edge:

Graphics[Circle[],Frame->True,FrameStyle->{{Thick,Directive[Thick,Dashed]},{Blue,Red}}]

Specify the frame style of a grid:

Grid[Table[x,{4},{7}],Frame->All,FrameStyle->Directive[Red,Dotted]]

OpenersExampleSubsection2(Spacer1)Frame Labels and Ticks  (5)

Place labels on the bottom and left frame edges:

Plot[Sin[x],{x,0,10},Frame->True,FrameLabel->{x,y}]

Specify labels for each edge:

Plot[Sin[x],{x,0,10},Frame->True,FrameLabel->{{y,Sin[x]},{x,"plot"}}]

Put a frame, but no ticks:

Plot[Sin[x],{x,0,10},Frame->True,FrameTicks->None]

Place frame tick marks and labels automatically:

Plot[Sin[x],{x,0,10},Frame->True,FrameTicks->Automatic]

Place frame tick marks at the specified positions:

Plot[Sin[x],{x,0,10},Frame->True,FrameTicks->{{{-1,0,1},None},{{0,Pi,2Pi,3Pi},None}}]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (10)

OpenersExampleSubsection3(Spacer1)Grid Frame Positions  (6)

Put no frame on the first column, a frame on the second, then repeat the default (which is no frame):

Grid[Table[x,{4},{7}],Frame->{{None,True},None}]

Put no frame on the first column, then put a frame on the second and all subsequent columns:

Grid[Table[x,{4},{7}],Frame->{{None,{True}},None}]

Put no frame on the first row, a frame on the second, then repeat the default (which is no frame):

Grid[Table[x,{4},{7}],Frame->{None,{None,True}}]

Frame a specific row and column:

Grid[Table[x,{4},{7}],Frame->{3->True,2->True}]

Frame the last column and the last row:

Grid[Table[x,{4},{7}],Frame->{-1->True,-1->True}]

Frame a set of items:

Grid[Table[x,{4},{7}],Frame->{None,None,{{1,1}->True,{3,3}->True}}]

Frame a region of the grid:

Grid[Table[x,{4},{7}],Frame->{None,None,{{{1,3},{1,3}}->True}}]

Put a frame around an individual element in the grid:

Grid[{{Item[a,Frame->True],b},{c,d}}]

OpenersExampleSubsection4(Spacer1)Grid Frame Styling  (4)

Frame rows and columns with specific styles:

Grid[Table[x,{4},{7}],Frame->{3->Red,2->Directive[Blue,Thick]}]

Frame a region of the grid with specific styles:

Grid[Table[x,{4},{7}],Frame->{None,None,{{{1,3},{1,3}}->Thick,{{2,4},{2,4}}->Red}}]

Put a styled frame around an individual element:

Grid[{{Item[a,Frame->True,FrameStyle->Directive[Red,Thick]],b},{c,d}}]

Individually styled frames can be used with (RefLink[FrameStyle, paclet:ref/FrameStyle]), and have higher priority:

Grid[Table[x,{4},{7}],Frame->{{1->Red,3->Dashed},2->Directive[Blue,Thin]},FrameStyle->Directive[Black,Thick]]

OpenersExampleSection3(Spacer1)Applications  (1)

Frame diagonal elements:

Grid[Partition[Range[100],10],Frame->{None,None,Table[{k,k}->True,{k,10}]}]

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

(RefLink[Dividers, paclet:ref/Dividers]) can be used to individually specify the dividers between rows and columns:

Grid[Table[x,{4},{7}],Dividers->{{True},{True}}]

Grid[Table[x,{4},{7}],Frame->{{True},{True}}]

In 2D, frames are drawn above the graphics:

Graphics[{Pink,Disk[]},Frame->True,PlotRange->{{0,1},{0,1}}]

Objects in (RefLink[Epilog, paclet:ref/Epilog]) are drawn on top of any graphics, including frames:

Graphics[{Pink,Disk[]},Frame->True,Epilog->{Blue,Disk[{0,0},.5]},PlotRange->{{0,1},{0,1}}]

(RefLink[GridLines, paclet:ref/GridLines]) puts grids across the image:

Graphics[Circle[],GridLines->Automatic,Frame->True]

OpenersExampleSection5(Spacer1)Neat Examples  (1)

Frame the upper-left subgrids:

Grid[Partition[Range[100],10],Frame->{None,None,Table[{{1,k},{1,k}}->True,{k,10}]}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Framed, paclet:ref/Framed])  ▪  (RefLink[Dividers, paclet:ref/Dividers])  ▪  (RefLink[FrameLabel, paclet:ref/FrameLabel])  ▪  (RefLink[FrameTicks, paclet:ref/FrameTicks])  ▪  (RefLink[FrameStyle, paclet:ref/FrameStyle])  ▪  (RefLink[Boxed, paclet:ref/Boxed])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Options for Graphics, paclet:tutorial/Options])}, {▪(RefLinkPlain[Tables and Matrices, paclet:tutorial/TablesAndMatrices])}, {▪(RefLinkPlain[Grids, Rows, and Columns, paclet:tutorial/GridsRowsAndColumnsOverview])}, {▪(RefLinkPlain[Formatted Output, paclet:tutorial/FormattedOutput])}, {▪(RefLinkPlain[The Structure of Graphics, paclet:tutorial/TheStructureOfGraphics])}, {▪(RefLinkPlain[Graphics and Sound, paclet:tutorial/GraphicsAndSoundOverview])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Graphics Annotation & Appearance, paclet:guide/GraphicsAnnotationAndAppearance])}, {▪(RefLinkPlain[Grids & Tables, paclet:guide/GridsAndTables])}, {▪(RefLinkPlain[Graphics Options & Styling, paclet:guide/GraphicsOptionsAndStyling])}, {▪(RefLinkPlain[Data Visualization, paclet:guide/DataVisualization])}, {▪(RefLinkPlain[Function Visualization, paclet:guide/FunctionVisualization])}, {▪(RefLinkPlain[Annotating & Combining Graphics, paclet:guide/AnnotatingAndCombiningGraphics])}, {▪(RefLinkPlain[Layout & Tables, paclet:guide/LayoutAndTables])}, {▪(RefLinkPlain[User Interface Structuring & Layout, paclet:guide/UserInterfaceStructuringAndLayout])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/20-options.html])(WebLink[: Options, https://www.wolfram.com/language/elementary-introduction/20-options.html])}})}})