I am wondering why there is a difference in the results from evaluating the two expressions, which differ only in the order of the arguments given to Show
.
When I run
Animate[Show[spring[t], bob[t], traj], {t, 0, 20}]
the animation is different from
Animate[Show[traj, spring[t], bob[t]], {t, 0, 20}]
Parts of the plot get cut off, depending on the order of the arguments.
Show
takes options from the first argument which is different for those cases. $\endgroup$Show[g1, g2,...]
orShow[{g1, g2,...}]
concatenates the graphics primitives in thegi
, effectively overlaying the graphics." And: "The lists of non-default options in thegi
are concatenated." $\endgroup$Show
does not care about options ingi
other thang1
(AFAIK). $\endgroup$p3 = Show[ p1 = Plot[x^2, {x, 0, 2}], p2 = Plot[2 Sin[x], {x, 0, 3}, ImageMargins -> 100] ]; AbsoluteOptions[p1]
The first occurrence of an option overrides later ones, which are deleted.ImageMargins
is set to0.
inp1
, which would causeImageMargins -> 100
to be ignored, IF that is how it works. In effect, then, what you say is true, too, since the first plot seems to set every possible option, or at least the documented ones. In any case, the doc. is at least misleading. $\endgroup$