Emulate ggplot2 default color palette

What function can I use to emulate ggplot2’s default color palette for a desired number of colors. For example, an input of 3 would produce a character vector of HEX colors with these colors:

ggplot2 plot area margins?

Is there an easy way to increase the space between the plot title and the plot area below it (the box with the data). Similarly, I’d prefer to have some space between the axis title and axis labels.

ggplot2: sorting a plot

I have a data.frame, that is sorted from highest to lowest. For example:

x <- structure(list(variable = structure(c(10L, 6L, 3L, 4L, 2L, 8L, 9L, 5L, 1L, 7L), .Label = c("a", "b", "c", "d", "e", "...

ggplot geom_text font size control

I tried to change the font to 10 for the labels of my bar plot in ggplot2 by doing something like this:

ggplot(data=file,aes(x=V1,y=V3,fill=V2)) +

Wind rose with ggplot (R)?

I am looking for good R code (or package) that uses ggplot2 to create wind roses that show the frequency, magnitude and direction of winds.

I’m particularly interested in ggplot2 as building the …