Browse Source

Updated figure

master
Bob Rudis 10 years ago
parent
commit
ba70f98c94
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 4
      R/statebins.R
  2. 2
      README.md

4
R/statebins.R

@ -42,7 +42,7 @@ statebins <- function(state_data, state_col="state", value_col="value",
gg <- ggplot(st.dat, aes(x=col, y=row, label=abbrev))
gg <- gg + geom_tile(aes(fill=fill_color))
gg <- gg + geom_tile(color=state_border_col, aes(fill=fill_color), size=3, show_guide=FALSE)
gg <- gg + geom_text(color=text_color, size=1)
gg <- gg + geom_text(color=text_color, size=2)
gg <- gg + scale_y_reverse()
gg <- gg + scale_fill_brewer(palette=brewer_pal, name=legend_title)
gg <- gg + coord_equal()
@ -112,7 +112,7 @@ statebins_continuous <- function(state_data, state_col="state", value_col="value
gg <- gg + geom_tile(aes_string(fill=value_col))
gg <- gg + geom_tile(color=state_border_col,
aes_string(fill=value_col), size=3, show_guide=FALSE)
gg <- gg + geom_text(color=text_color, size=1)
gg <- gg + geom_text(color=text_color, size=2)
gg <- gg + scale_y_reverse()
gg <- gg + continuous_scale("fill", "distiller",
gradient_n_pal(brewer_pal(type, brewer_pal)(6), NULL, "Lab"), na.value = "grey50", name=legend_title)

2
README.md

@ -66,7 +66,7 @@ library(testthat)
date()
```
## [1] "Mon Aug 25 22:24:40 2014"
## [1] "Mon Aug 25 22:25:49 2014"
``` {.r}
test_dir("tests/")

Loading…
Cancel
Save