Skip to content

Commit

Permalink
Updating examples
Browse files Browse the repository at this point in the history
  • Loading branch information
csgillespie committed Apr 30, 2019
1 parent a85c3ca commit f1b16bc
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: prettyB
Type: Package
Title: Pretty Base Graphics
Version: 0.1.0
Version: 0.1.1
Authors@R: person(given="Colin", family="Gillespie",
email="[email protected]", role = c("aut", "cre"))
Maintainer: Colin Gillespie <[email protected]>
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
## Version 0.1.1
* Adding examples to ?plot

## Version 0.1.0
* Initial version
10 changes: 10 additions & 0 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
#' @export
#' @import graphics stats
#' @rdname plot
#' @examples
#' # PrettyB overloads standard plotting functions
#' plot(1:10)
#' # All arguments still work as expect
#' plot(iris$Sepal.Length, iris$Sepal.Width, bg = "red")
#' # Use par as usual
#' op = par(mfrow = c(1, 2))
#' plot(rnorm(10), xlab = "X")
#' plot(rnorm(10), main = "A title")
#' par(op)
plot = function (x, y, ...) UseMethod("plot")

## XXX: Make formula pretty - need to grab x & y
Expand Down
12 changes: 12 additions & 0 deletions R/prettyB-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#' The prettyB package
#'
#' Anyone who uses R Base graphics, have a 100 and 1 tweaks that they use to make the
#' figures more presentable. This package aims to capture the tweaks in one place.
#' By masking_standard plotting functions, we can automatically make base graphics a bit more pretty.
#' @name prettyB-package
#' @aliases prettyB prettyb prettyB-package
#' @docType package
#' @author \email{[email protected]}
#' @keywords package
#' @seealso \url{https://github.com/jumpingrivers/prettyB}
NULL
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The second `plot()` function call is from the **prettyB** package.

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

```{r, plot-expand, fig.width=12, echo=c(-1, -5)}
```{r, plot-expand, fig.width=12, echo=-5}
theme_set("expand")
par(mfrow = c(1, 2))
graphics::plot.default(iris$Sepal.Length, iris$Sepal.Width,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The second `plot()` function call is from the **prettyB** package.
There are currently two themes: `expand` and `minimal`(default):

``` r
theme_set("expand")
par(mfrow = c(1, 2))
graphics::plot.default(iris$Sepal.Length, iris$Sepal.Width,
main="Classic Iris Dataset", xlab="Length", ylab="Width")
Expand Down
11 changes: 11 additions & 0 deletions man/plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/prettyB-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f1b16bc

Please sign in to comment.