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$
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$
  • $\begingroup$ Thank you @kglr ! I accept your answers! Have a great weekend! $\endgroup$ – Gilmar Rodriguez Pierluissi Sep 13 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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