Skip to content

Commit

Permalink
tinyplot 已经发布在 CRAN 上
Browse files Browse the repository at this point in the history
  • Loading branch information
XiangyunHuang committed Jun 21, 2024
1 parent d76f08a commit d1d638b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ jobs:
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.4.550
version: 1.4.555

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: '4.4.0'
extra-repositories: 'https://grantmcdermott.r-universe.dev'
r-version: '4.4.1'

- uses: r-lib/actions/setup-r-dependencies@v2

Expand Down
2 changes: 0 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,4 @@ Suggests:
Enhances:
sp (>= 2.0-0)
SystemRequirements: pgf (>= 3.00)
Additional_repositories:
https://grantmcdermott.r-universe.dev
BugReports: https://github.com/XiangyunHuang/msg2nd/issues
32 changes: 22 additions & 10 deletions visualization-graphics.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -533,22 +533,34 @@ tinyplot(Sepal.Length ~ Sepal.Width | Species,
on.exit(par(op), add = TRUE)
```

还可以绘制其它类型的图形,如分组密度曲线图等
还可以绘制其它类型的图形,如分组密度曲线图、分面散点图等

```{r}
#| label: fig-tinyplot-density
#| fig-cap: tinyplot 包绘制密度曲线图
#| fig-width: 5
#| label: fig-tinyplot-others
#| fig-cap: tinyplot 包的分组和分面功能
#| fig-subcap:
#| - 分组密度曲线图
#| - 分面散点图
#| fig-width: 6
#| fig-height: 5
#| fig-showtext: true
#| layout-ncol: 1
#| layout-nrow: 2
with(iris, tinyplot(
density(Sepal.Length), by = Species,
bg = "by", # 分组填充
tinyplot(
~ Petal.Length | Species, data = iris,
type = "density",
fill = "by", # 分组填充
grid = TRUE, # 背景网格
palette = "Tableau 10",
legend = list("topright", bty = "o") # 右上角图例
))
palette = "Tableau 10"
)
tinyplot(
Petal.Width ~ Petal.Length | Sepal.Length, data = iris,
facet = ~ Species, # 分面
grid = TRUE, pch = 19, frame = TRUE,
palette = terrain.colors # 生成调色板的函数指定配色
)
```

### plot3D 包 {#sec-graphics-plot3D}
Expand Down

0 comments on commit d1d638b

Please sign in to comment.