2
$\begingroup$

I start the following mock data set:

data = RandomReal[{0, 700}, {10^4, 2}];

I use k to define the number of cluster points:

k = 9;

Then I build a cluster chart with a legend as follows:

primarycolors = {Red, Orange, Yellow, Green, Blue, Magenta, Cyan, LightGray, Black};

primarycolorsnames = {"Red", "Orange", "Yellow", "Green", "Blue", 
   "Magenta", "Cyan", "Light Gray", "Black"};

labels = Row[{primarycolorsnames[[#]], " - cluster"}] & /@ 
   Range[1, k];

plot = ListPlot[FindClusters[data, k, Method -> "KMeans"], 
  AspectRatio -> 1, Frame -> True, Axes -> True, 
  FrameLabel -> {"2019 HWOL Average Monthly Job Ads", 
    "Annual Average Job Openings"}, 
  LabelStyle -> Directive[Black, 16, Bold], ImageSize -> 600, 
  PlotLabel -> 
   Style[Framed["Macondo Region"], 16, Black, Bold, 
    Background -> Lighter[Yellow]], PlotStyle -> primarycolors, 
  PlotLegends -> labels]

My question is: How can I increase the pointsize of the point-markers in the legend without affecting the pointsize of the points in the cluster-chart? Thank you!

$\endgroup$

1 Answer 1

4
$\begingroup$

You can use

PlotLegends -> PointLegend[labels, LegendMarkerSize -> 15]

enter image description here

Alternatively,

PlotLegends -> SwatchLegend[labels, LegendMarkers -> {"Bubble", 10}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you @kglr ! I accept your answers! Have a great weekend! $\endgroup$ Commented Sep 13, 2019 at 19:09

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.