Add summary label in stacked bar chart using ggplot

The script below illustrates how to add one label per stack in a stacked bar chart using ggplot in R. In this case, labels indicate the sum of values represented in each bar stack. The idea is to create as many labels as bars, but assign text to only one label per stack, then plot labels according to stack height.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s