From 0a77be4a9ae67afa12d532c1014264318d81d597 Mon Sep 17 00:00:00 2001 From: Fei Zhao Date: Wed, 18 Aug 2021 11:36:12 +0800 Subject: [PATCH] change some image link (#32) * Update 09-graphs-ggplot2.Rmd change image link * Update 09-graphs-ggplot2.Rmd --- book/09-graphs-ggplot2.Rmd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/book/09-graphs-ggplot2.Rmd b/book/09-graphs-ggplot2.Rmd index 873a764..007b8fc 100644 --- a/book/09-graphs-ggplot2.Rmd +++ b/book/09-graphs-ggplot2.Rmd @@ -2097,7 +2097,7 @@ scale_colour_manual(values=cbPalette) ```{r, fig.cap="色盲友好调色板", echo=F} -knitr::include_graphics("http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/colorblind_palette.jpg") +knitr::include_graphics("https://kaopubear-1254299507.cos.ap-shanghai.myqcloud.com/picgo/202108181124226.png") ``` #### 颜色选择 @@ -2105,7 +2105,7 @@ knitr::include_graphics("http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/color 默认情况下,离散比例的颜色围绕 HSL 色环均匀分布。例如,如果有两种颜色,那么它们将从圆圈上的相对点中选择; 如果有三种颜色,它们在色环上将相隔 120° 等等。用于不同级别的颜色如下所示: ```{r, fig.cap="均匀色环", echo=F} -knitr::include_graphics("http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/figure/unnamed-chunk-7-1.png") +knitr::include_graphics("https://kaopubear-1254299507.cos.ap-shanghai.myqcloud.com/picgo/202108181126387.png") ``` 默认颜色选择使用 `scale_fill_hue()` 和 `scale_colour_hue()`。 例如,在以下情况下添加这些命令是多余的: @@ -2185,7 +2185,7 @@ ggplot(df, aes(x=xval, y=yval, colour=yval)) + geom_point() + 颜色可以指定为十六进制 RGB 三元组合,例如 `#0066CC`。 前两位数字是红色,接下来的两位是绿色,最后两位是蓝色。 每个值的范围从 00 到 FF,以十六进制(base-16)表示,在 base-10 中等于 0 和 255。 例如,在下表中,`#FFFFFF` 为白色,`#990000` 为深红色。 ```{r, fig.cap="色码图", echo=F} -knitr::include_graphics("http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/hextable.png") +knitr::include_graphics("https://kaopubear-1254299507.cos.ap-shanghai.myqcloud.com/picgo/202108181126059.png") ``` > 色码图来源于 [http://www.visibone.com](http://www.visibone.com/) @@ -2193,5 +2193,5 @@ knitr::include_graphics("http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/hexta #### RColorBrewer 调色板图表 ```{r, fig.cap="调色板图表", echo=F} -knitr::include_graphics("http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/figure/unnamed-chunk-14-1.png") +knitr::include_graphics("https://kaopubear-1254299507.cos.ap-shanghai.myqcloud.com/picgo/202108181127063.png") ```