WORKFLOW
Combine Graphics
Here are bar chart and line plot graphics:
{BarChart[{2, 3, 7}], ListLinePlot[{2, 3, 7}]}Combine the graphics into a single graphic using Show:
Show[{BarChart[{2, 3, 7}], ListLinePlot[{2, 3, 7}]}]- The scaling of the first graphic is used when graphics are combined, which may cause the scaling of the second graphic in the combination to change.
- Use GraphicsGrid to make a grid of graphics. See Put Graphics in a Grid for details.
Show[
Graphics[Disk[{0, 0}]],
Graphics[Circle[{3, 0}]],
Graphics[Rectangle[{1, 1}]]
]You can specify the appearance of the result with options to Show:
Because the options of the first graphic (such as PlotRange and AspectRatio) determine the options of the result, the order of arguments in Show can have a large effect on the appearance of the output:
Show[Graphics[Disk[]], Plot[Sin[x], {x, 0, 22}]]Show[Plot[Sin[x], {x, 0, 22}], Graphics[Disk[]]]Locations of elements in combined graphics are determined by their coordinate values:
Show[
Graphics[Line[{{1, 1}, {2, 2}}]],
Graphics[Circle[{0, 0}]]
]Use Overlay to stack graphics:
Overlay[{
Graphics[Line[{{1, 1}, {2, 2}}]],
Graphics[Circle[{0, 0}]]
}]You can plot multiple datasets directly with plotting and charting functions (without having to combine graphics):
ListLinePlot[{{1, 2, 4}, {2, 3, 3}}]Show also works with 3D graphics. Here are two 3D graphics, a plot of a helix and a sphere:
{ParametricPlot3D[{u / 10, Sin[u], Cos[u]}, {u, -20, 20}], Graphics3D[Sphere[]]}Show[{ParametricPlot3D[{u / 10, Sin[u], Cos[u]}, {u, -20, 20}], Graphics3D[Sphere[]]}]