Skip to content

Commit

Permalink
rm call to strwidth() (closes #17)
Browse files Browse the repository at this point in the history
  • Loading branch information
leeper committed Jul 14, 2017
1 parent aace3dd commit 8b60538
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: slopegraph
Version: 0.1.13
Version: 0.1.14
Title: Edward Tufte-Inspired Slopegraphs
Date: 2016-12-08
Date: 2017-07-14
Authors@R: c(person("Thomas", "Leeper", role = c("aut","cre"),
email = "thosjleeper@gmail.com"))
Description: Convert a data frame (containing a panel dataset, where rows
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
@@ -1,3 +1,7 @@
# slopegraph 0.1.14

* Remove call to `strwidth()` in `ggslopegraph()`. (#17, h/t Boris Shor)

# slopegraph 0.1.13

* Added a new dataset, "bachelors", containing data on US Bachelors degrees conferred 1974-2013.
Expand Down
2 changes: 1 addition & 1 deletion R/ggslopegraph.R
Expand Up @@ -135,7 +135,7 @@ function(data,
}

if (is.null(offset.x)) {
offset.x <- (max(strwidth(sprintf(fmt, long[["value"]]))) + 0.02)/2L
offset.x <- (max(nchar(sprintf(fmt, long[["value"]]))) + 0.02)/2L
}

# segments
Expand Down

0 comments on commit 8b60538

Please sign in to comment.