How to | Customize My Graphics
The Wolfram Language allows you to customize your 2D and 3D graphics through a variety of options.
Without any options set, Plot uses a variety of default option values for color, axes style, and so on:
Plot[Sin[x], {x, 0, 2π}]Plot[Sin[x], {x, 0, 2π}, PlotLabel -> Sin[x]]Plot[Sin[x], {x, 0, 2π}, PlotLabel -> Style[Sin[x], {Red, 18}]]Plot[Sin[x], {x, 0, 2π}, PlotStyle -> Directive[Thick, Dashed, Red]]Plot[Sin[x], {x, 0, 2π}, AxesStyle -> Directive[Thick, Dashed, Red]]Plot[Sin[x], {x, 0, 2π}, LabelStyle -> Directive[Thick, Dashed, Red]]Add points under or over the plot:
Plot[Sin[x], {x, 0, 2π}, Prolog -> {Red, PointSize[0.02], Point[{{π / 2, 1}, {3π / 2, -1}}]},
Epilog -> {Green, PointSize[0.02], Point[{{0, 0}, {π, 0}, {2π, 0}}]}]Add several styled graphics primitives to the plot:
Plot[Sin[x], {x, 0, 2π}, Epilog -> {
{Red, Text["extrema", {4, 0.5}, {-1, -1}]},
{Blue, Arrowheads[{-0.04, 0.04}], Arrow[{{π / 2, 1}, {4, 0.5}, {3π / 2, -1}}]}}]The default graphics produced by Plot3D use a variety of default option values:
Plot3D[Sin[x] + Sin[y], {x, -6, 6}, {y, -6, 6}]Control the intersection point of the axes:
Plot3D[Sin[x] + Sin[y], {x, -6, 6}, {y, -6, 6}, Boxed -> False, AxesOrigin -> {-6, -6, -2}]Plot several surfaces together:
Plot3D[{-x ^ 4 - y ^ 4, x ^ 2 + y ^ 2, (x / 1.3) ^ 5 + (y / 1.3) ^ 5}, {x, -2, 2}, {y, -2, 2}]Control the regions over which the surfaces are plotted:
Plot3D[{-x ^ 4 - y ^ 4, x ^ 2 + y ^ 2, (x / 1.3) ^ 5 + (y / 1.3) ^ 5}, {x, -2, 2}, {y, -2, 2}, RegionFunction -> Function[{x, y, z}, x ^ 4 + y ^ 4 ≤ 4]]Specify lighting simulation to use for coloring the surfaces:
Plot3D[{-x ^ 4 - y ^ 4, x ^ 2 + y ^ 2, (x / 1.3) ^ 5 + (y / 1.3) ^ 5} , {x, -2, 2}, {y, -2, 2}, RegionFunction -> Function[{x, y, z}, x ^ 4 + y ^ 4 ≤ 4], Mesh -> None, Lighting -> {{"Point", Yellow, {0, -5, -5}}, {"Point", Blue, {0, 3, 3}}, {"Point", Red, {-3, -3, 0}}, {"Point", Green, {5, 5, 0}}}]Control the ratio of the box dimensions and add other styles:
Plot3D[{-x ^ 4 - y ^ 4, x ^ 2 + y ^ 2, (x / 1.3) ^ 5 + (y / 1.3) ^ 5}, {x, -2, 2}, {y, -2, 2}, RegionFunction -> Function[{x, y, z}, x ^ 4 + y ^ 4 ≤ 4], BoxRatios -> {1, 1, 1}, Axes -> False, Background -> Black, Boxed -> False, Mesh -> None]