ggfittext provides some useful text displaying capability to ggplot2, including a new geom called geom_bar_text.
Showing posts with label ggplot2. Show all posts
Showing posts with label ggplot2. Show all posts
Saturday, January 30, 2021
Monday, November 30, 2020
Getting past the little hiccups to getting plotly animations into slides
Very helpful post regarding how to use plotly graph in xaringan slides.
Thursday, November 29, 2018
Saturday, November 24, 2018
Wednesday, March 28, 2018
Tuesday, March 27, 2018
Tuesday, February 02, 2016
Thursday, March 05, 2015
Thursday, November 21, 2013
Sunday, November 10, 2013
Friday, October 11, 2013
Using Zelig and ggplot2 together
I am not the only person doing that, apparently. Here is an example.
Tuesday, November 20, 2012
Extra themes for ggplot2
Ggthemes is a new package that provides additional themes for ggplot2. It can even be used to draw a Stata-like graph. I particularly like the Tufte-style, as outlined in The Visual Display of
Quantitative Information.
Thursday, October 18, 2012
Saturday, June 02, 2012
Drawing a map
Tuesday, June 28, 2011
Sunday, May 22, 2011
Legends in ggplot2
A simple plot takes a few lines of coding:
g1 <- ggplot(d, aes(birth.year))
g2 <- g1 + geom_line(aes(y=alive0, linetype="Famale")) +
geom_line(aes(y=alive1, linetype="Male")) + scale_linetype_discrete(name = "")
g3 <- g2 + geom_point(aes(y=alive0, shape="Famale")) +
geom_point(aes(y=alive1, shape="Male")) + scale_x_continuous("") + scale_y_continuous("Proportion Alive in 1982") + opts(legend.position=c(.24, .95), legend.justification = c(1, 1)) + scale_shape_discrete(name="")
g4 <- g3 + labs(fill="")
g1 <- ggplot(d, aes(birth.year))
g2 <- g1 + geom_line(aes(y=alive0, linetype="Famale")) +
geom_line(aes(y=alive1, linetype="Male")) + scale_linetype_discrete(name = "")
g3 <- g2 + geom_point(aes(y=alive0, shape="Famale")) +
geom_point(aes(y=alive1, shape="Male")) + scale_x_continuous("") + scale_y_continuous("Proportion Alive in 1982") + opts(legend.position=c(.24, .95), legend.justification = c(1, 1)) + scale_shape_discrete(name="")
g4 <- g3 + labs(fill="")
Tuesday, March 15, 2011
Labels and legends in ggplot2 figure
Sunday, February 13, 2011
A few summary functions used by ggplot2
I could not quite figure out what the summary function "mean_sdl" stands for, so I took at a look at the source code "stat-summary.r". It turns out that this is a wrapper function of the "smean_sdl()" of the Hmisc package, as well as the "median_hilow", "mean_cl_normal" and "mean_cl_boot".
Friday, October 29, 2010
Ggplot2, some tricks
Here is how to remove the grey in the background as well as the grid, a modification of the default black/white theme.
Subscribe to:
Posts (Atom)
