The other answers point out important differences which I won't repeat. But here's another one. Overlay
is implemented by drawing everything. It visually stacks all of its contents. Show
is implemented by merging the primitive lists and options. This introduces some important differences.
For example, if the options contradict one another in plots, then Show
will pick the first fully resolved option. E.g.,
Show[Plot[Sin[x], {x, 0, 2 \[Pi]}, AxesOrigin -> {0, 0}],
Plot[Cos[x], {x, 0, 2 \[Pi]}, AxesOrigin -> {\[Pi], 0}]]

Or, you can even add the option to Show
to override all local options.
Show[Plot[Sin[x], {x, 0, 2 \[Pi]}, AxesOrigin -> {0, 0}],
Plot[Cos[x], {x, 0, 2 \[Pi]}, AxesOrigin -> {\[Pi], 0}],
AxesOrigin -> {2 \[Pi], 0}]

Overlay
can do nothing more than a visual superposition. Incidentally, since Overlay
is doing a visual superposition, that means that it might end up double-drawing things that you don't intend to be double-drawn. For example, imagine you have plots which have GridLines
(for simplicity, I'll just use the same plot twice here):
p = Plot[x, {x, 0, 1}, GridLines -> Automatic]

Overlay[{p, p}]

Oops..what happened to those grid lines? They got a lot darker in the Overlay
version. They got darker because, by default, GridLines
are rendered as partially transparent. This was done so that they look reasonable regardless of the choice of background color you might have chosen for the graphic. But here, what you've done is to overdraw a transparent color on itself, thereby making a darker color. If that description wasn't very clear, then this should help to illustrate what I'm talking about:
Graphics[{GrayLevel[0, 0.3],
Rectangle[{0, 0}, {1.2, 1.2}], Rectangle[{.8, .8}, {2, 2}]}]

That is exactly what's going on in the Overlay
case. And, furthermore, it even has subtle drawing effects on things you might not have noticed at first. For example, antialiasing is implemented as a pixel compositing operation, effectively equivalent to using transparency. Which means that anything in a graphic which is antialiased and multiply drawn is going to look darker around the edges. That's why the tick labels in the Overlay
example above look darker. If you look carefully at the screenshot you provide in your question, you'll notice that your tick labels look darker, too.
Okay...so those are some subtle issues with overdrawing. Let's try a non-subtle issue...plots with background colors:
Overlay[{Plot[Sin[x], {x, 0, 2 Pi}, Background -> LightBlue],
Plot[Cos[x], {x, 0, 2 Pi}, Background -> LightOrange]}]

Oops...where did the sine wave go? Because the plots are visually stacked, the background color for the second plot completely obscures everything that was drawn as part of the first graphic.
Overlay
never rasterizes anything. The point is thatShow
called on multipleGraphics
objects will always return something with headGraphics
that has effectively merged the primitive list and options, whileOverlay
returns a thing with headOverlay
that merely shows the items (which need not be graphics) visually stacked. $\endgroup$ – John Fultz Dec 31 '15 at 2:37