rstudio / thematic

Theme ggplot2, lattice, and base graphics based on a few simple settings.
https://rstudio.github.io/thematic/
Other
244 stars 10 forks source link

Can't control lattice axis/strip borders #100

Open mbacou opened 3 years ago

mbacou commented 3 years ago

Thematic seems to override custom par.settings arguments, e.g. I am not able to change the color and width of axis lines and strip borders.

thematic_off()

xyplot(Sepal.Length + Sepal.Width ~ Petal.Length + Petal.Width | Species,
  data = iris,
  par.settings=list(
    axis.line=list(col="transparent"), 
    strip.border=list(col="white", lwd=4)
  )
)

image

thematic_on()

xyplot(Sepal.Length + Sepal.Width ~ Petal.Length + Petal.Width | Species,
  data = iris,
  par.settings=list(
    axis.line=list(col="transparent"), 
    strip.border=list(col="white", lwd=4)
  )
)

The intent is to hide axis lines and strip borders, as above, but arguments are ignored:

image

thematic_on("transparent", "#000000", c("#008080", "#87aab4"), 
  font_spec("Lato"),
  sequential=sequential_gradient(0.5, 0.5, F),
  qualitative=c(
    "#008080", "#51676f", "#233b5d", "#772d42", 
    "#c58f69", "#ef5b84", "#09585d", "#87aab4"
  ))

xyplot(Sepal.Length + Sepal.Width ~ Petal.Length + Petal.Width | Species,
  data = iris,
  par.settings=list(
    axis.line=list(col="transparent"), 
    strip.border=list(col="white", lwd=4)
  )
)

image

Session Info

R version 4.0.4 (2021-02-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8        LC_COLLATE=C.UTF-8    
 [5] LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8    LC_PAPER=C.UTF-8       LC_NAME=C             
 [9] LC_ADDRESS=C           LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] terra_1.1-17      data.table_1.14.0 lattice_0.20-41   scales_1.1.1      thematic_0.1.2   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6           plyr_1.8.6           highr_0.8            compiler_4.0.4       pillar_1.6.0        
 [6] tools_4.0.4          downlit_0.2.1        digest_0.6.27        jsonlite_1.7.2       evaluate_0.14       
[11] lifecycle_1.0.0      tibble_3.1.0         gtable_0.3.0         pkgconfig_2.0.3      rlang_0.4.10        
[16] rstudioapi_0.13      distill_1.2          curl_4.3             yaml_2.2.1           xfun_0.22           
[21] stringr_1.4.0        dplyr_1.0.5          raster_3.4-5         knitr_1.32           generics_0.1.0      
[26] vctrs_0.3.7          systemfonts_1.0.1    rappdirs_0.3.3       tidyselect_1.1.0     grid_4.0.4          
[31] glue_1.4.2           R6_2.5.0             textshaping_0.3.3    fansi_0.4.2          rmarkdown_2.7       
[36] sp_1.4-5             reshape2_1.4.4       farver_2.1.0         purrr_0.3.4          ggplot2_3.3.3       
[41] magrittr_2.0.1       codetools_0.2-18     htmltools_0.5.1.9000 ellipsis_0.3.1       colorspace_2.0-0    
[46] ragg_1.1.2           utf8_1.2.1           stringi_1.5.3        munsell_0.5.0        crayon_1.4.1