Skip to content

Commit f1b16bc

Browse files
committed
Updating examples
1 parent a85c3ca commit f1b16bc

File tree

8 files changed

+59
-2
lines changed

8 files changed

+59
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: prettyB
22
Type: Package
33
Title: Pretty Base Graphics
4-
Version: 0.1.0
4+
Version: 0.1.1
55
Authors@R: person(given="Colin", family="Gillespie",
66
email="csgillespie@gmail.com", role = c("aut", "cre"))
77
Maintainer: Colin Gillespie <csgillespie@gmail.com>

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
## Version 0.1.1
2+
* Adding examples to ?plot
3+
14
## Version 0.1.0
25
* Initial version

R/plot.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
#' @export
88
#' @import graphics stats
99
#' @rdname plot
10+
#' @examples
11+
#' # PrettyB overloads standard plotting functions
12+
#' plot(1:10)
13+
#' # All arguments still work as expect
14+
#' plot(iris$Sepal.Length, iris$Sepal.Width, bg = "red")
15+
#' # Use par as usual
16+
#' op = par(mfrow = c(1, 2))
17+
#' plot(rnorm(10), xlab = "X")
18+
#' plot(rnorm(10), main = "A title")
19+
#' par(op)
1020
plot = function (x, y, ...) UseMethod("plot")
1121

1222
## XXX: Make formula pretty - need to grab x & y

R/prettyB-package.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#' The prettyB package
2+
#'
3+
#' Anyone who uses R Base graphics, have a 100 and 1 tweaks that they use to make the
4+
#' figures more presentable. This package aims to capture the tweaks in one place.
5+
#' By masking_standard plotting functions, we can automatically make base graphics a bit more pretty.
6+
#' @name prettyB-package
7+
#' @aliases prettyB prettyb prettyB-package
8+
#' @docType package
9+
#' @author \email{csgillespie@gmail.com}
10+
#' @keywords package
11+
#' @seealso \url{https://github.com/jumpingrivers/prettyB}
12+
NULL

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The second `plot()` function call is from the **prettyB** package.
5555

5656
There are currently two themes: `expand` and `minimal`(default):
5757

58-
```{r, plot-expand, fig.width=12, echo=c(-1, -5)}
58+
```{r, plot-expand, fig.width=12, echo=-5}
5959
theme_set("expand")
6060
par(mfrow = c(1, 2))
6161
graphics::plot.default(iris$Sepal.Length, iris$Sepal.Width,

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The second `plot()` function call is from the **prettyB** package.
4646
There are currently two themes: `expand` and `minimal`(default):
4747

4848
``` r
49+
theme_set("expand")
4950
par(mfrow = c(1, 2))
5051
graphics::plot.default(iris$Sepal.Length, iris$Sepal.Width,
5152
main="Classic Iris Dataset", xlab="Length", ylab="Width")

man/plot.Rd

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/prettyB-package.Rd

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)