Home > Software engineering >  Combine smallest elements in one category 'Other' in a pie chart R
Combine smallest elements in one category 'Other' in a pie chart R

Time:02-12

I am trying to plot a pie chart with only 3 segments. I want the 2 largest elements and after that all the smallest elements in one category "Other" . Is there a way to do this directly from a charting package or do I need to manipulate the data set to combine all the smallest values into one. And is there a quick function to do that? Thanks for your answers.

CodePudding user response:

A quick way of doing is this is by slightly formatting your data set. Since you didn't provide an example, I borrowed one from pie chart with three colours

  • Related