Skip to content

Commit aa8c7d7

Browse files
committed
Merge pull request #423 from ropensci/fix/line-size
fix #373
2 parents 1530880 + 4c93edc commit aa8c7d7

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

.travis.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ addons:
88
packages:
99
- r-base-dev
1010
- r-recommended
11-
- qpdf
1211

1312
env:
1413
global:
15-
- R_LIBS_USER=~/R/library NOT_CRAN=true
14+
- R_LIBS_USER=~/R/library NOT_CRAN=true R_PKG="$(basename $TRAVIS_REPO_SLUG)"
1615
# plotly_api_key (for posting to plot.ly)
1716
- secure: "jlIAFoBGaDWUQDh6oGNb2BgU31/80iioM4y4xwx35yWkGKkNIID1eMEuiIn+/ipLvOVHkPTDS6DYnOtD8EIBpROgAKHFY33gM1h7P6NRxVszzC6WLP2ASnq95DWq36DAC2Oevy05V7nwSRFilPwSt6JLppYUInG+WdaZ+QOSRi4="
1817
# GITHUB_PAT (for pushing to plotly-test-table)
@@ -24,19 +23,23 @@ cache:
2423

2524
before_script:
2625
- mkdir -p "$R_LIBS_USER"
26+
- git config --global user.email "cpsievert1@gmail.com"
27+
- git config --global user.name "Carson Sievert"
2728
- echo "Sys.setenv('plotly_username' = 'cpsievert')" > ~/.Rprofile
2829
- git clone https://github.com/cpsievert/plotly-test-table.git ../plotly-test-table
2930
- "wget -q -O - https://github.com/yihui/crandalf/raw/master/inst/scripts/install-pandoc | bash"
3031
- Rscript -e 'if (length(find.package("devtools", quiet = TRUE)) == 0L) { install.packages("devtools", repos = "http://cran.rstudio.com") }'
31-
- Rscript -e 'library(devtools);update_packages("devtools", repos = "http://cran.rstudio.com")'
32-
- Rscript -e 'library(devtools);install_deps(repos = "http://cran.rstudio.com", dependencies = TRUE)'
32+
- Rscript -e 'devtools::update_packages("devtools", repos = "http://cran.rstudio.com")'
33+
- Rscript -e 'devtools::install_deps(repos = "http://cran.rstudio.com", dependencies = TRUE)'
34+
- cd ..; rm -f *.tar.gz; R CMD build $R_PKG
35+
- R CMD INSTALL ${R_PKG}_*.tar.gz
3336

3437
script:
3538
# run R CMD check on the non-pull request build
36-
- sh -c "if [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then Rscript -e 'devtools::check()'; fi"
39+
- sh -c "if [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then R CMD check ${R_PKG}_*.tar.gz --no-manual; fi"
3740
# we do some fancy stuff on the pull request build that confuses R CMD check
38-
- sh -c "if [ '$TRAVIS_PULL_REQUEST' != 'false' ]; then Rscript -e 'devtools::install(); source(\"tests/testthat.R\", chdir = T)'; fi"
41+
- sh -c "if [ '$TRAVIS_PULL_REQUEST' != 'false' ]; then Rscript -e 'source(\"plotly/tests/testthat.R\", chdir = T)'; fi"
3942

4043
after_success:
41-
- cd ../plotly-test-table
44+
- cd plotly-test-table
4245
- Rscript ../plotly/inst/build-push-comment.R

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library
3-
Version: 2.3.0
3+
Version: 2.3.1
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "cpsievert1@gmail.com"),
66
person("Chris", "Parmer", role = c("aut", "cph"),

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.3.1 -- 25 Jan 2015
2+
3+
More accurate conversion of path width. Fixes #373.
4+
15
2.3.0 -- 19 Jan 2015
26

37
Add sharing argument and deprecate world_readable. Fixes #332

R/trace_generation.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ geom2trace <- list(
565565
# when converting ggplot2 size to plotly size, we assume size is an _area_,
566566
# but "size" for lines really means linewidth, so size is a _length_ in this case
567567
# (see aesConverters$size)
568-
params$size <- sqrt(params$size)
568+
params$size <- ifelse(params$size < 1, params$size ^ 2, sqrt(params$size))
569569
list(x=data$x,
570570
y=data$y,
571571
name=params$name,

0 commit comments

Comments
 (0)