Top "Ggplot2" questions

ggplot2 is an actively maintained open-source chart-drawing package for R, written by Hadley Wickham, based upon the principles of "Grammar of Graphics". It partially replaces R's basic plot and the lattice package, while providing a clean, powerful, orthogonal and fun API.

How to deal with "data of class uneval" error from ggplot2?

While trying to overlay a new line to a existing ggplot I am getting the following error: Error: ggplot2 doesn't …

r ggplot2
Construct a manual legend for a complicated plot

I cannot figure out how to manually set up a legend for this plot. All I really want is a …

r data-visualization ggplot2
How to get a barplot with several variables side by side grouped by a factor

I have a dataset which looks like this one below. I am trying to make a barplot with the grouping …

r ggplot2 bar-chart
Stacked bar chart

I would like to create a stacked chart using ggplot2 and geom_bar. Here is my source data: Rank F1 …

r ggplot2 geom-bar
R: "Unary operator error" from multiline ggplot2 command

I'm using ggplot2 to do a boxplot comparison of two different species, as indicated by the third column shown below: &…

r ggplot2 multiline reshape2
geom_smooth() what are the methods available?

I'm using geom_smooth() from ggplot2. In Hadley Wickham's book ("ggplot2 - Elegant Graphics for Data Analysis") there is an …

r ggplot2
Increase distance between text and title on the y-axis

The y-axis title appears too close to the axis text. ggplot(mpg, aes(cty, hwy)) + geom_point() I have tried …

r layout plot ggplot2
Add a common Legend for combined ggplots

I have two ggplots which I align horizontally with grid.arrange. I have looked through a lot of forum posts, …

r ggplot2 legend gridextra
How to put labels over geom_bar for each bar in R with ggplot2

I've found this, How to put labels over geom_bar in R with ggplot2, but it just put labels(numbers) …

r ggplot2 bar-chart
Any way to make plot points in scatterplot more transparent in R?

I have a 3 column matrix; plots are made by points based on column 1 and column 2 values, but colored based on …

r plot ggplot2 alpha