1
$\begingroup$
data = Get["http://t.cn/RSzJjcb"];
ListPlot[Values[data], PlotLegends -> PointLegend[Keys@data, LegendMarkerSize -> 10]]

enter image description here

But the the size of legend is too small.I try LegendMarkerSize -> 50 but not works.

But in the doc,this really works,so how to deal with it?

enter image description here

$\endgroup$

1 Answer 1

4
$\begingroup$

It works if you explicitly define the list of colors as the first argument of PointLegend. (ColorData[97] is the default color scheme.)

colors = ColorData[97] /@ Range[Length[Keys@data]];

ListPlot[Values[data],
 PlotLegends -> PointLegend[colors, Keys@data, LegendMarkerSize -> 20]
 ]

EDIT: You don't event have to explicitly define the list of colors, only its ColorData number.

ListPlot[Values[data],
 PlotLegends -> PointLegend[97, Keys@data, LegendMarkerSize -> 20]
 ]

plot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.