Skip to content

Commit 19780da

Browse files
Update README
1 parent 86dff1c commit 19780da

5 files changed

Lines changed: 32 additions & 30 deletions

File tree

README.md

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11

2-
# plot2
2+
3+
# tinyplot
34

45
<!-- badges: start -->
56

67
[![CRAN
7-
version](https://www.r-pkg.org/badges/version/plot2.png)](https://CRAN.R-project.org/package=plot2)
8+
version](https://www.r-pkg.org/badges/version/tinyplot.png)](https://CRAN.R-project.org/package=tinyplot)
89
[![R-universe status
9-
badge](https://grantmcdermott.r-universe.dev/badges/plot2.png)](https://grantmcdermott.r-universe.dev)
10-
[![R-CMD-check](https://github.com/grantmcdermott/plot2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/grantmcdermott/plot2/actions/workflows/R-CMD-check.yaml)
11-
[![Docs](https://img.shields.io/badge/docs-homepage-blue.svg)](https://grantmcdermott.com/plot2/index.html)
10+
badge](https://grantmcdermott.r-universe.dev/badges/tinyplot.png)](https://grantmcdermott.r-universe.dev)
11+
[![R-CMD-check](https://github.com/grantmcdermott/tinyplot/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/grantmcdermott/tinyplot/actions/workflows/R-CMD-check.yaml)
12+
[![Docs](https://img.shields.io/badge/docs-homepage-blue.svg)](https://grantmcdermott.com/tinyplot/index.html)
1213
<!-- badges: end -->
1314

1415
## What
1516

1617
A lightweight extension of the base R graphics system, with support for
17-
automatic grouping, legends, facets and various other enhancements.
18+
automatic grouping, legends, facets, and various other enhancements.
1819

19-
**plot2** is not yet on CRAN, but can be installed from R-universe.
20+
**tinyplot** is not yet on CRAN, but can be installed from R-universe.
2021

2122
``` r
22-
install.packages("plot2", repos = "https://grantmcdermott.r-universe.dev")
23+
install.packages("tinyplot", repos = "https://grantmcdermott.r-universe.dev")
2324
```
2425

2526
Our goal is to submit to CRAN within the first few months of 2024, once
2627
we have settled on some remaining design choices and features support.
2728
You can take a look at the [open
28-
issues](https://github.com/grantmcdermott/plot2/issues) to see what’s
29+
issues](https://github.com/grantmcdermott/tinyplot/issues) to see what’s
2930
currently under consideration. Please feel free to weigh on these if you
3031
have opinions. We want end users to have a say in determining the final
3132
product.
@@ -35,7 +36,7 @@ product.
3536
R users are spoiled for choice when it comes to visualization
3637
frameworks. The options include **ggplot2** (arguably the most important
3738
graphics system of the last decade) and **lattice**, not to mention a
38-
bewildering array of extensions built around, on top of, and in between
39+
bewildering array of extensions built on top of, around, and in between
3940
these amazing packages.
4041

4142
As a result, it is perhaps not surprising that the base R graphics
@@ -52,43 +53,44 @@ the generic `plot()` function can require several function calls or a
5253
loop, fiddling with your plot regions, and then generating the legend
5354
manually.
5455

55-
The **plot2** package aims to remove this overhead. It provides a
56+
The **tinyplot** package aims to remove this overhead. It provides a
5657
lightweight (zero dependency) extension of the base R graphics system
57-
with various convenience features, particularly for representing groups
58-
with your data. For example, the core `plot2()` function makes it easy
59-
to plot different categories of a dataset in a single function call and
60-
highlight these categories (groups) using modern colour palettes.
61-
Coincident with this grouping support, `plot2()` also produces automatic
62-
legends with scope for further customization. While the package offers
63-
several other enhancements like facets, it tries as far as possible to
64-
be a drop-in replacement for the equivalent base plot function. Users
65-
should generally be able to swap a valid `plot()` call with `plot2()`
66-
without any changes to the expected output.
58+
with various convenience features, particularly for representing grouped
59+
data. For example, the core `tinyplot()` function—or its shorthand
60+
`plt()` alias—makes it easy to plot different groups of a dataset in a
61+
single function call and highlight these groups using modern colour
62+
palettes. Coincident with this grouping support, **tinyplot** also
63+
produces automatic legends with scope for further customization. While
64+
the package offers several other enhancements like facets, it tries as
65+
far as possible to be a drop-in replacement for the equivalent base
66+
plotting function. Users should generally be able to swap a valid
67+
`plot()` call for `tinyplot()` without any changes to the expected
68+
output.
6769

6870
## Quickstart
6971

70-
The **plot2** website includes a detailed [introductory
71-
tutorial](https://grantmcdermott.com/plot2/vignettes/intro_tutorial.html),
72+
The **tinyplot** website includes a detailed [introductory
73+
tutorial](https://grantmcdermott.com/tinyplot/vignettes/intro_tutorial.html),
7274
with numerous examples. But here are some quickstart examples of the
7375
package in action.
7476

7577
``` r
76-
library(plot2)
78+
library(tinyplot)
7779
```
7880

7981
Grouped scatterplot with automatic legend:
8082

8183
``` r
82-
# with(iris, plot2(x = Petal.Length, y = Sepal.Length, by = Species)) # atomic
83-
plot2(Sepal.Length ~ Petal.Length | Species, data = iris) # formula
84+
# with(iris, tinyplot(x = Petal.Length, y = Sepal.Length, by = Species)) # atomic
85+
tinyplot(Sepal.Length ~ Petal.Length | Species, data = iris) # formula
8486
```
8587

8688
<img src="man/figures/README-quickstart2-1.png" style="width:70.0%" />
8789

8890
Same plot with a few extra aesthetic tweaks:
8991

9092
``` r
91-
plot2(
93+
tinyplot(
9294
Sepal.Length ~ Petal.Length | Species,
9395
data = iris,
9496
palette = "dark", pch = 16,
@@ -101,7 +103,7 @@ plot2(
101103
Grouped grouped density plot with automatic legend:
102104

103105
``` r
104-
plot2(
106+
tinyplot(
105107
~ Petal.Length | Species,
106108
data = iris,
107109
type = "density",
@@ -117,7 +119,7 @@ Grouped scatterplot, combined with facet layout:
117119

118120
``` r
119121
iris2 = transform(iris, Sepals = ifelse(Sepal.Length>6, "Long", "Short"))
120-
plot2(
122+
tinyplot(
121123
Sepal.Length ~ Petal.Length | Sepals, data = iris2,
122124
facet = ~Species,
123125
facet.args = list(bg = "grey90"),
@@ -131,5 +133,5 @@ plot2(
131133

132134
Hopefully, these have been enough to pique your interest. Head over to
133135
the [intro
134-
tutorial](https://grantmcdermott.com/plot2/vignettes/intro_tutorial.html)
136+
tutorial](https://grantmcdermott.com/tinyplot/vignettes/intro_tutorial.html)
135137
for many more examples, including range plots and customization.
-218 KB
Loading
-137 KB
Loading
-180 KB
Loading
-258 KB
Loading

0 commit comments

Comments
 (0)