目录
Jeffrey Arnold

[bugfix] Fix 301 status for a URL (#196)

Fixes:

Found the following (possibly) invalid URLs: URL: https://www.economist.com/blogs/graphicdetail (moved to https://www.economist.com/topics/graphic-detail) From: man/theme_economist.Rd Status: 301 Message: Moved Permanently For content that is ‘Moved Permanently’, please change http to https, add trailing slashes, or replace the old by the new URL.

5个月前783次提交

R-CMD-check Code Coverage
Status rstudio mirror
downloads CRAN
status lifecycle

Some extra geoms, scales, and themes for ggplot.

Install

To install the stable version from CRAN,

install.packages('ggthemes', dependencies = TRUE)

Or, to install the development version from github, use the devtools package,

library("devtools")
install_github(c("hadley/ggplot2", "jrnold/ggthemes"))

How to use

For a quick tutorial, check out Rafael Irizarry’s book.

Examples

library("ggplot2")
library("ggthemes")

mtcars2 <- within(mtcars, {
  vs <- factor(vs, labels = c("V-shaped", "Straight"))
  am <- factor(am, labels = c("Automatic", "Manual"))
  cyl  <- factor(cyl)
  gear <- factor(gear)
})

p1 <- ggplot(mtcars2) +
  geom_point(aes(x = wt, y = mpg, colour = gear)) +
  labs(
    title = "Fuel economy declines as weight increases",
    subtitle = "(1973-74)",
    caption = "Data from the 1974 Motor Trend US magazine.",
    x = "Weight (1000 lbs)",
    y = "Fuel economy (mpg)",
    colour = "Gears"
  )
p1 +
  scale_color_calc() +
  theme_calc()

p1 + theme_clean()

p1 + theme_economist() +
  scale_colour_economist()

p1 + theme_excel() +
  scale_colour_excel()

p1 + theme_excel_new() +
  scale_colour_excel_new()

p1 + theme_igray()

p1 + theme_par()

p1 + theme_fivethirtyeight()

p1 + theme_few() +
  scale_colour_few()

p1 + theme_solarized() +
  scale_colour_solarized()

p1 + theme_solarized(light=FALSE) +
  scale_colour_solarized()

p1 + theme_solid()

p1 + theme_tufte()

p1 + theme_wsj(base_size = 8) + scale_color_wsj()

p1 + scale_color_colorblind()

p1 + scale_color_tableau()

关于

提供用于ggplot2的额外主题、比例和几何对象,扩展数据可视化功能

63.9 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号