2
$\begingroup$

I'm trying to get a reasonable match for the following PieChart.

enter image description here

I understand how to make the piechart, tweak the colors, placement of labels, etc.

PieChart[{17, 6, 9, 6, 4, 29, 29}, 
 ChartLegends -> {"Job", "Homework", "Meals", "Relaxation", "Travel", 
   "Sleep", "School"}, 
 ChartStyle -> {Blue, Red, Purple, Pink, Green, Yellow, Orange}, 
 LegendAppearance -> "Column"]

The default size of the legend seems really small, with such a small "swatch" it's hard to match the colors. The only command (that I can find) to adjust the Legend is with LegendAppearance, and this appears to only change to rows or columns. Is it possible to increase the size of the legend relative to the entire plot?

$\endgroup$
1
$\begingroup$

By using SwatchLegend[] legends can be customised. In the current case LegendMarkerSize can be adjusted to get bigger markers.

PieChart[{17, 6, 9, 6, 4, 29, 29}, 
 ChartLegends -> 
  SwatchLegend[{"Job", "Homework", "Meals", "Relaxation", "Travel", 
    "Sleep", "School"}, LegendMarkerSize -> 40], 
 ChartStyle -> {Blue, Red, Purple, Pink, Green, Yellow, Orange}, 
 LegendAppearance -> "Column"]

enter image description here

$\endgroup$
  • $\begingroup$ Didn't know that function, perfect, I am regularly in debt to this community for their amazing (and quick!) help! $\endgroup$ – Tom De Vries Mar 7 '17 at 2:57

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.