I have a complex Graphics3D
and would like to include a BarLegend
, such as:
mylegend =
BarLegend[{Hue[#] &, {0, 1}},
LegendFunction -> "Frame",
LegendLabel -> Text[Style["time (s)", 16]]]
I then Insert
and place it into the full figure this way:
Show[
Graphics3D[{Sphere[],
Inset[barLegend, {1, 1, 1}]}]]
This is almost what I seek. I would like mylegend to have a solid background color to thus obscure the 3D graphics behind it, including the frame.
I could use Placed
and Framed
and Background
and work hard to achieve this. It would be so much simpler if a framed legend had the option of a background color, but as far as I can see from the documentation, it doesn't. Obvious attempts such as to following do not work:
BackgroundColor -> Yellow
Background -> Yellow
Style -> {Black, Background -> Yellow}
etc.