I tried using Placed[legend,{1,0.5}]
but it leaves some unnecessary gap between the right frame boundary and the legend. I know there is a way to use nested position specification {{1,0.5},{something,something}}
but don't understand it. Can someone please help me. Is there a way to specify the exact gap to leave between the legend and the right frame boundary.
Below is an example where the legend can be placed immediately to the right of right frame with {{1,0.5},{0.2,0.5}}
but i want to figure it out for any rectangular graph? A general method or builtin option.
data = {{{1, 1}, {1, 2}, {2, 3}}, {{1, 1}, {2, 1}, {1, 1}}};
Show[
RectangleChart[data, PlotTheme -> "Detailed",
ChartLegends -> Placed[{"A", "B", "C"}, {1, 0.5}]],
RectangleChart[data, PlotTheme -> "Detailed",
ChartLegends -> Placed[{"A", "B", "C"}, {{1, 0.5}, {0, 0.5}}]],
RectangleChart[data, PlotTheme -> "Detailed",
ChartLegends -> Placed[{"A", "B", "C"}, {{1, 0.5}, {0.1, 0.5}}]],
RectangleChart[data, PlotTheme -> "Detailed",
ChartLegends -> Placed[{"A", "B", "C"}, {{1, 0.5}, {0.2, 0.5}}]],
ImageSize -> Full
]
The reason i want to find a way to get the legend exactly on the right frame so i can then manually specify the distance between the frame and legend. I have a lot of graphs being generated automatically and they look weird unless i can specify the exact distance.