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 make graphics with transparent background in R using ggplot2?

I need to output ggplot2 graphics from R to PNG files with transparent background. Everything is ok with basic R …

r graphics transparency ggplot2
Plot correlation matrix into a graph

I have a matrix with some correlation values. Now I want to plot that in a graph that looks more …

r ggplot2 plot correlation
Saving grid.arrange() plot to file

I am trying to plot multiple plots using ggplot2, arranging them using grid.arrange(). Since I managed to find someone …

r ggplot2 gridextra
Group data and plot multiple lines

I'd like to plot multiple lines in R for this dataset: (x = Year, y = Value) School_ID Year Value A 1998 5 …

r ggplot2 linechart
How to fix the aspect ratio in ggplot?

I'm trying to resize a plot to fit into my document, but I'm having difficulties getting the plotted diagram do …

r ggplot2
Draw a trend line using ggplot

I used ggplot2 to draw a trend line based on my data. Below is something I've done using spreadsheet. But …

r ggplot2 trendline
Force R to stop plotting abbreviated axis labels - e.g. 1e+00 in ggplot2

In ggplot2 how can I stop axis labels being abbreviated - e.g. 1e+00, 1e+01 along the x axis once …

r graph ggplot2 axes
Annotating text on individual facet in ggplot2

I want to annotate some text on last facet of the plot with the following code: library(ggplot2) p <…

r ggplot2 facet facet-wrap facet-grid
Using ggplot2, can I insert a break in the axis?

I want to make a bar plot where one of the values is much bigger than all other values. Is …

r ggplot2 r-faq
Put stars on ggplot barplots and boxplots - to indicate the level of significance (p-value)

It's common to put stars on barplots or boxplots to show the level of significance (p-value) of one or between …

r ggplot2 boxplot p-value bar-chart