Similar to Changing the plotting order in Show, I'd like to have control over plotting order with more advanced graphics, like a Legended
ListPlot
with FrameLabels
. Specifics aside, I've adapted the solution from the previous question for my particular case:
Show[b, a, AbsoluteOptions[a]]
which works perfectly for me, up to the text used to label the plot and axes, which prints FrameBox["Label", TraditionalForm ]
as if wrapped in one too many FrameBox
es. Placing labeling within the Show
also doesn't work.
My Best Answer So Far
It seems to me the most side-effect free way of Show
ing things is to do the following:
- Define desired settings in first plot (
a
) - Define other plots (
b..
) - Try
Show[..b, a, AbsoluteOptions[a]]
- For side-effected options, duplicate them before
AbsoluteOptions
. As placing options inShow
do not perform the same lower-level routines (i.e. defining lower-level options) that functions likePlot
andListPlot
do, this trick allows you to set a specific option you want (like theFrameLabel
text), usingAbsoluteOptions
as the shim to add in all the lower-level details (like plot boundaries, text positions, spacing, etc.).
This worked in my case, but still leaves me with some open questions:
- Where is
Options
better thanAbsoluteOptions
and vice versa? - What happens if your desired option is different enough from what's specified in
a
(using nomenclature from above) that some of the lower-level options are incorrect? E.g. say I specified aFrameLabel
that was super long inShow
, but not when defininga
. (this is a case I could easily test, I will do so and revise this, but I also bet that this is generally a case for potential for side-effects)
Example
Here is a faithful but reasonably minimal working example.