4

I'm creating a stacked bar plot of relative abundance data, but I only want to display the ten most abundant organisms in the legend. How do I do this? I have no idea where to begin and haven't found any answers online.

Here's the plot with a full legend:

enter image description here

Thanks.

RB88
  • 157
  • 1
  • 3
  • 10

1 Answers1

4

As pointed out by user20650 in the comments, the answer is to add a list of selected items to the breaks= argument in scale_fill_manual()

scale_fill_manual(breaks=list,values=colpal)

Community
  • 1
  • 1
RB88
  • 157
  • 1
  • 3
  • 10