I would like to add 4 legends on a simple bar chart below, but only the last 2 legends appear on the graph.
BarChart[{{1, 2, 3, 4}, {3, 1, 2, 5}, {5, 2, 3, 2}, {2, 3, 1, 3}},
ChartLegends -> {Placed[SwatchLegend[{Black}, {"Show"}], {0.2, 0.2}],
Placed[SwatchLegend[{Red}, {"me"}], {0.4, 0.4}],
Placed[SwatchLegend[{Pink}, {"Hello"}], {0.8, 0.8}],
Placed[SwatchLegend[{Green}, {"World"}], {0.9, 0.9}]}]
Above is the break down version, initial command is like this, neither one works:
BarChart[{{1, 2, 3, 4}, {3, 1, 2, 5}, {5, 2, 3, 2}, {2, 3, 1, 3}},
ChartLegends -> MapThread[Placed[SwatchLegend[{#1}, {#2}], #3] &,
{{Black, Red, Pink, Green}, {"Show", "me", "Hello","World"},
{{0.2, 0.2}, {0.4, 0.4}, {0.8, 0.8}, {0.9, 0.9}}}]]
Although I can group them up and call it liks below, but the legends need to be placed as specified.
BarChart[{{1, 2, 3, 4}, {3, 1, 2, 5}, {5, 2, 3, 2}, {2, 3, 1, 3}},
ChartLegends -> {Placed[SwatchLegend[{Black, Red, Pink, Green},
{"Show", "me", "Hello", "World"}], {0.2, 0.2}]}]
PlotLegends don't seem to have such issue:
ListPlot[{{1, 2, 3, 4}, {3, 1, 2, 5}, {5, 2, 3, 2}, {2, 3, 1, 3}},
PlotLegends -> MapThread[Placed[SwatchLegend[{#1}, {#2}], #3] &,
{{Black, Red, Pink, Green}, {"Show", "me", "Hello", "World"},
{{0.2, 0.2}, {0.4, 0.4}, {0.8, 0.8}, {0.9, 0.9}}}]]