I have a plot as below:-
lg1 = {GraphicsRow[{Blue, "- Type A"}], GraphicsRow[{Orange, "- Type B"}]};
plot1 = ListPlot[{{{4, 1}, {3, 6}, {3, 4}}, {{4, 7}, {8, 5}, {2, 6}}}, PlotRange -> All];
Legended[plot1, lg1]
As you can see, the legend is very "loose". I want to to be more compact. In fact I can change lg1
to lg1 = Column@{"Blue - Type A", "Orange - Type B"}
, but then the color will become text as below:-
How can I keep the color and make it more compact? Many thanks!
ListPlot[{{{4, 1}, {3, 6}, {3, 4}}, {{4, 7}, {8, 5}, {2, 6}}}, PlotRange -> All, PlotLegends -> {"Type A", "Type B"}]
$\endgroup$Legended
is needed to be at the outer most layer. In my real case, there is ashow
between theLegended
and the plots (there are several plots), and the legend needs to be dynamic as well. Thus theLegended
cannot just be input as a plot option. $\endgroup$