Skip to content

Commit

Permalink
version 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau authored and cran-robot committed Nov 29, 2023
1 parent 52210d1 commit 2cf6f79
Show file tree
Hide file tree
Showing 48 changed files with 518 additions and 724 deletions.
16 changes: 10 additions & 6 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: tabula
Title: Analysis and Visualization of Archaeological Count Data
Version: 3.0.0
Version: 3.0.1
Authors@R: c(
person("Nicolas", "Frerebeau", , "nicolas.frerebeau@u-bordeaux-montaigne.fr", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5759-4944", affiliation = "Université Bordeaux Montaigne")),
Expand All @@ -13,7 +13,9 @@ Authors@R: c(
person("Anne", "Philippe", , "anne.philippe@univ-nantes.fr", role = "ctb",
comment = c(ORCID = "0000-0002-5331-5087", affiliation = "Université de Nantes")),
person("Jean-Baptiste", "Fourvel", , "jean-baptiste.fourvel@univ-amu.fr", role = "ctb",
comment = c(ORCID = "0000-0002-1061-4642", affiliation = "CNRS"))
comment = c(ORCID = "0000-0002-1061-4642", affiliation = "CNRS")),
person("Université Bordeaux Montaigne", role = "fnd"),
person("CNRS", role = "fnd")
)
Maintainer: Nicolas Frerebeau <nicolas.frerebeau@u-bordeaux-montaigne.fr>
Description: An easy way to examine archaeological count data. This
Expand All @@ -28,7 +30,7 @@ URL: https://packages.tesselle.org/tabula/,
https://github.com/tesselle/tabula
BugReports: https://github.com/tesselle/tabula/issues
Depends: R (>= 3.5)
Imports: arkhe (>= 1.2.0), graphics, grDevices, methods, stats, utils
Imports: arkhe (>= 1.4.0), graphics, grDevices, methods, stats, utils
Suggests: folio, khroma, knitr, rmarkdown, rsvg, svglite, tinysnapshot,
tinytest
VignetteBuilder: knitr
Expand All @@ -45,7 +47,7 @@ Collate: 'AllClasses.R' 'AllGenerics.R' 'coerce.R' 'data.R'
'show.R' 'statistics.R' 'subset.R' 'tabula-deprecated.R'
'tabula-internal.R' 'tabula-package.R' 'validate.R' 'zzz.R'
NeedsCompilation: no
Packaged: 2023-08-22 13:42:23 UTC; nicolas
Packaged: 2023-11-28 15:24:55 UTC; nicolas
Author: Nicolas Frerebeau [aut, cre] (<https://orcid.org/0000-0001-5759-4944>,
Université Bordeaux Montaigne),
Brice Lebrun [ctb] (<https://orcid.org/0000-0001-7503-8685>, Université
Expand All @@ -57,6 +59,8 @@ Author: Nicolas Frerebeau [aut, cre] (<https://orcid.org/0000-0001-5759-4944>,
Anne Philippe [ctb] (<https://orcid.org/0000-0002-5331-5087>,
Université de Nantes),
Jean-Baptiste Fourvel [ctb] (<https://orcid.org/0000-0002-1061-4642>,
CNRS)
CNRS),
Université Bordeaux Montaigne [fnd],
CNRS [fnd]
Repository: CRAN
Date/Publication: 2023-08-22 15:40:02 UTC
Date/Publication: 2023-11-28 17:20:02 UTC
94 changes: 47 additions & 47 deletions MD5
@@ -1,8 +1,8 @@
2636f1ec1b7ab7bbc893b563d25ee5ce *DESCRIPTION
d0ca5bb4381c18023efb3c8b81d14a64 *DESCRIPTION
ac3c6d49d5d63b800b9775134d2621cf *NAMESPACE
a322c8caf084b350e8fd6355fd20051b *NEWS.md
f3d4245c49ef9b0c620809c891ff36dc *NEWS.md
0aab1f5b793b4d3ebadc35df17948b65 *R/AllClasses.R
df4a42d56a97071c5f914e6c081908f8 *R/AllGenerics.R
3f8b82b79699c4330e4ec9f29a358964 *R/AllGenerics.R
576d7158313b0d1659b39749d1190a80 *R/coerce.R
b1ce810545709e744b9bedf528bbe67a *R/data.R
e6df453ad576e48e977f0af0de54a2b9 *R/index_diversity.R
Expand All @@ -15,11 +15,11 @@ e6df453ad576e48e977f0af0de54a2b9 *R/index_diversity.R
95c30decacb45ac9d83da105453bf9d0 *R/matrigraph.R
41e1b61c4bcad429a0f9455095760e9f *R/mutators.R
1eecc320191bc831af5ad49763f1141e *R/plot_bertin.R
b50c04ef7502a7bd6ac14aab4d61875c *R/plot_diceleraas.R
5dcd87ce077fa376134b994de7a5cf05 *R/plot_diceleraas.R
933ce28d404157b067252589e6979f7f *R/plot_diversity.R
c441f228baca2a9e9ed533cd5a3f7cb1 *R/plot_ford.R
f647ed47953b17f2db3fb10c358bcf0e *R/plot_ford.R
fe9f328805bc497fda5231692d81e947 *R/plot_heatmap.R
371e53d2e78d46ea6696f9e1c36541de *R/plot_matrix.R
0a2a9ce1c16086df440b7120482ed2fb *R/plot_matrix.R
1dae2dca19c0fca788e949cfbdbd576a *R/plot_rank.R
a66efa1ffc4a5b2c39838a1bf4011cd4 *R/plot_rarefaction.R
6a3b8ae67d8920a65dda12ab15ad20f7 *R/plot_spot.R
Expand All @@ -29,24 +29,24 @@ f66be366d8a318633d6f94eb35eb52cf *R/reexport.R
2df88bc1bc60fba5d5462aa529de36e9 *R/statistics.R
4546d9b3afaac52088fe2fd5fb666203 *R/subset.R
46b3d99af5efca7ae68c5819fc0bc462 *R/tabula-deprecated.R
f433fab567c01e7f4aa343c2c972e71e *R/tabula-internal.R
96ddcf26cd5045e5f965635430dae2e3 *R/tabula-package.R
fdb7b70492d0717bcb483a31692ab3b6 *R/tabula-internal.R
50b019b65baf32b0325874d41a4b0aec *R/tabula-package.R
69f7f17397dace4351c945006f40cd92 *R/validate.R
0f6098825e057e8c7ff33ee8758143f8 *R/zzz.R
9e4c2b1deff695c13f2913bd7d4ebf04 *README.md
7080893e02c49cd296d4424b9be55069 *build/partial.rdb
c892eb68237bb4a63c49c8d7e63bbda4 *build/vignette.rds
33da6c0dc580743255c6c51ebaed1f02 *README.md
8faf250d78a120ba4c7ea2186efddd24 *build/partial.rdb
0923c4a4352f4852cf2dfa55425810c4 *build/vignette.rds
d591a172ed051c79f4aada5cab0714da *data/aves.rda
965974d7e6aca16756d415676b6d0f91 *data/cantabria.rda
38be695b45cd9a4ed371e7eeba8e2adb *data/pueblo.rda
3db9998be9751c08065ac88465d934f4 *data/woodland.rda
01c08c9b17dc48b142775c0d20a2a6f2 *inst/CITATION
728451b3ef05295fd3bf669c46296e20 *inst/CITATION
46750e778a5cdb4d65c347f8e43df623 *inst/doc/bibliography.R
1ce99d6139b36c341c6a9f8c293c7b24 *inst/doc/bibliography.Rmd
2d8cbfdbddea92120c93b770c0e2d63d *inst/doc/bibliography.html
775f4e8d9509bab6089e5aa6960a641f *inst/doc/bibliography.html
a44844d3036b47aead32e30bbf4d2cba *inst/doc/diversity.R
39484cb097f4313fc76d89d53b68f4d9 *inst/doc/diversity.Rmd
cb1aeb06f0c7b62f2c1aad508d68bf85 *inst/doc/diversity.html
2952244236e46724e4271d009847367d *inst/doc/diversity.html
7018708bac5eea1b2ba3e41a2607c4a9 *inst/examples/ex-bootstrap.R
2bd882730442e90b2c6328a1d11524a5 *inst/examples/ex-diceleraas.R
5446dfcb622e72816e892c08e37824be *inst/examples/ex-diversity.R
Expand Down Expand Up @@ -76,36 +76,36 @@ aa2d37ccb4ab750826611d8897bce5f8 *inst/tinytest/_snaps/rarefaction.rds
13e4fc4edf28cf1513761731b5af3429 *inst/tinytest/_snaps/richness_bootstrap.rds
69ab38287ca80315b6867c591f6027e2 *inst/tinytest/_snaps/richness_jackknife.rds
cdebfff1db58db052cd8553a7007c7f9 *inst/tinytest/_snaps/shannon_test.rds
5ed033a9d466355d499532c7e8fbebef *inst/tinytest/_tinysnapshot/plot_bertin_count.svg
0fd3a7d3cd94e90d2ca798faea241655 *inst/tinytest/_tinysnapshot/plot_bertin_noflip.svg
a0cda271b3a096a5d9d1890b9e922e43 *inst/tinytest/_tinysnapshot/plot_bertin_prop1.svg
4905f7ab83f0e3f4022c4f9c40b2f196 *inst/tinytest/_tinysnapshot/plot_bertin_prop2.svg
739eb2c1f0535a3e16fd16ad694674c2 *inst/tinytest/_tinysnapshot/plot_bertin_threshold.svg
5f50b668f43d3b249e5b5a32fa134d11 *inst/tinytest/_tinysnapshot/plot_bertin_count.svg
344cb37618adb0b6f4c9fe245beb4bfd *inst/tinytest/_tinysnapshot/plot_bertin_noflip.svg
3a0fb439106b749b3daa3a93e77b5ad8 *inst/tinytest/_tinysnapshot/plot_bertin_prop1.svg
04643af6143652afbaa8f3fb9c38e9a9 *inst/tinytest/_tinysnapshot/plot_bertin_prop2.svg
7f97205f46ff624cf5d986e0325d259f *inst/tinytest/_tinysnapshot/plot_bertin_threshold.svg
8cc98f6188772a62cb1f9dbe4941275f *inst/tinytest/_tinysnapshot/plot_dice_leraas.svg
2ccd08e17e40b82c44cb4cc8f6bf03cd *inst/tinytest/_tinysnapshot/plot_ford_count.svg
49d572c2dbac15e00040f64012e93538 *inst/tinytest/_tinysnapshot/plot_ford_weights.svg
072ea19eda5a5ea741485e7b420339b4 *inst/tinytest/_tinysnapshot/plot_ford_count.svg
c44883bc723964112fd171c9f02e3102 *inst/tinytest/_tinysnapshot/plot_ford_weights.svg
a8cc96c39e77bef96dfc6f415958fc6d *inst/tinytest/_tinysnapshot/plot_heterogeneity.svg
eceb0b8732a9de48512473bd8e62af83 *inst/tinytest/_tinysnapshot/plot_matrigraph.svg
451d2f0a99e0ccc010185a9512cafa30 *inst/tinytest/_tinysnapshot/plot_matrigraph_reverse.svg
14d463938ba54edf11d0a738ff77cae5 *inst/tinytest/_tinysnapshot/plot_mtx_count.svg
da89685176108442b2c15a84cd9b5527 *inst/tinytest/_tinysnapshot/plot_mtx_incid.svg
7e590d2f223d30979017b4cdc8bd2af5 *inst/tinytest/_tinysnapshot/plot_mtx_occ.svg
4b1d0cdbb69b10a0d7b8f54fa2d4a631 *inst/tinytest/_tinysnapshot/plot_mtx_prop1.svg
7f30d629eeb812d1098769825909b785 *inst/tinytest/_tinysnapshot/plot_mtx_prop2.svg
c9798b130d46869f7a8ddfed893f83ab *inst/tinytest/_tinysnapshot/plot_mtx_sim.svg
68ca72a9d6979fbe7aa443a5d8a5e28f *inst/tinytest/_tinysnapshot/plot_matrigraph.svg
6f489fe41a119f8f4d210ff972a76f8c *inst/tinytest/_tinysnapshot/plot_matrigraph_reverse.svg
83a258339cb3d5fc05416fb9115e92d9 *inst/tinytest/_tinysnapshot/plot_mtx_count.svg
1465692be4211eb1fc6b6590087fb448 *inst/tinytest/_tinysnapshot/plot_mtx_incid.svg
81f69cf3fa693461177846d3854fc657 *inst/tinytest/_tinysnapshot/plot_mtx_occ.svg
d23d8b2695f9f429bf3b451ea7ce290b *inst/tinytest/_tinysnapshot/plot_mtx_prop1.svg
f5da23fa05c467e4792b110f06b1b9f7 *inst/tinytest/_tinysnapshot/plot_mtx_prop2.svg
04b289455d698506176ed5c1f28ff3db *inst/tinytest/_tinysnapshot/plot_mtx_sim.svg
248e3f0b61d6592b6bcc06eddb4e94c1 *inst/tinytest/_tinysnapshot/plot_rank_log.svg
b9a6605c7fe1393aab7beec16905bf44 *inst/tinytest/_tinysnapshot/plot_rank_nolegend.svg
0518dcc762e27caff1bbf6e956a54cbb *inst/tinytest/_tinysnapshot/plot_rarefaction.svg
1ee90db5e5bdde388dec2d1a31d004d5 *inst/tinytest/_tinysnapshot/plot_rarefaction_nolegend.svg
19e22eaf5a8e698030a9eb8f1757c2d1 *inst/tinytest/_tinysnapshot/plot_richness.svg
d9da489c603740a14183fe0e6e1a9944 *inst/tinytest/_tinysnapshot/plot_seriograph.svg
0fcb91e5e4ba29335c7fd39adf51c5e8 *inst/tinytest/_tinysnapshot/plot_spot_occ.svg
b3b40bd2e676c01a3a24a8e5bb473013 *inst/tinytest/_tinysnapshot/plot_spot_plain.svg
3e4548e9980ce1e1520136063e49acad *inst/tinytest/_tinysnapshot/plot_spot_prop1.svg
8db4254a6d99c9a9c763de44b97e2579 *inst/tinytest/_tinysnapshot/plot_spot_prop2.svg
5de6458f6fd08154c7c1bf6d1b83e34e *inst/tinytest/_tinysnapshot/plot_spot_ring.svg
2df7343755bbd5b5be70270cf120b75a *inst/tinytest/_tinysnapshot/plot_spot_sim_plain.svg
100e8eb9233f75fdca9780de5c730a19 *inst/tinytest/_tinysnapshot/plot_spot_sim_ring.svg
81e16711f0abeef9761f21b962432067 *inst/tinytest/_tinysnapshot/plot_seriograph.svg
fdf3f41a4459701b74d465c4431eca39 *inst/tinytest/_tinysnapshot/plot_spot_occ.svg
879a1fc436a7d38c2be42024c688cc74 *inst/tinytest/_tinysnapshot/plot_spot_plain.svg
f8ea9ec2ccebdfcd4ca50f66c7a94d01 *inst/tinytest/_tinysnapshot/plot_spot_prop1.svg
13e1ef193e855eb69305d0482e61a1e3 *inst/tinytest/_tinysnapshot/plot_spot_prop2.svg
4bfaba5786c160e414169652e6fbf55b *inst/tinytest/_tinysnapshot/plot_spot_ring.svg
db164af2d23df3bab7df34322e8ca43e *inst/tinytest/_tinysnapshot/plot_spot_sim_plain.svg
7ccb6ab0fa11fd2dc9fee6901f285501 *inst/tinytest/_tinysnapshot/plot_spot_sim_ring.svg
8b42510146c18efc0eed7ce0e0d33afb *inst/tinytest/helpers.R
d05517c31a195c1954e83e61db088f40 *inst/tinytest/test_diversity.R
c25b145ebe5ca7b97c098c2f4fa2311e *inst/tinytest/test_index.R
Expand All @@ -125,35 +125,35 @@ a062aa4844028bdf86c16fa7cf35edba *man/RarefactionIndex-class.Rd
7d357cb7aea7189a8107ee4323da88ba *man/aves.Rd
23493b8115fc4f8d48debaaae5bd34ac *man/bootstrap.Rd
fe9e842ad1e6932b39d8a9b027958b81 *man/cantabria.Rd
8473ca7b4d311ae494af0f272b3adaa6 *man/figures/README-ford-1.png
c03c09d27e4507cdbd4fa9c56adf6bf9 *man/figures/README-occurrence-1.png
4528bcaffa6a0c7f8733a7b3a16ed710 *man/figures/README-ford-1.png
da15fea20d199f71062811addda3dfcc *man/figures/README-occurrence-1.png
36e86f62e27fecc4f172560043496faf *man/figures/README-sample-size-1.png
e6e99d34362d3980bff5eb78c0b12013 *man/figures/README-sample-size-2.png
7ccaa82d474f2fef37083bc9d5dade98 *man/figures/logo.png
ac628db93123c4bfbaea8265aa863b26 *man/heterogeneity.Rd
b9612ab3ae7d95689b8babf6d7a8e63f *man/jackknife.Rd
28675a2084954f7cb8183ca5897a3d20 *man/matrigraph.Rd
93071da727a336e6b7b4ca74fdead4dc *man/matrigraph.Rd
20ab3114fa410e398cc3749f59fec452 *man/mutators.Rd
f2d7784c169a4177ff5c6b1405390ca0 *man/occurrence.Rd
ea6677d20d6924dd73db1ab1b8e38ce5 *man/plot_bertin.Rd
e390e5075bce83602a96cfd07f3f074d *man/plot_bertin.Rd
40c535c52ec420b19d5e3550689d86ce *man/plot_diceleraas.Rd
9069a122ec03ec5dce7a0376f0055445 *man/plot_diversity.Rd
9f49787272ecc3576e914f31aa656265 *man/plot_ford.Rd
62ab4da260fcbae05396ff1f79577e6b *man/plot_heatmap.Rd
f30f70b79372f99abb2f1afb7f5397a6 *man/plot_matrix.Rd
c4e6721fe685dc5eed45c4907d3f8b67 *man/plot_ford.Rd
53dd8850785d33db1c7d01383da16641 *man/plot_heatmap.Rd
ed2162a1caf8e32800857f22bb1710e1 *man/plot_matrix.Rd
5c9879a98c45dda9551a4a598e68e93a *man/plot_rank.Rd
5300096f8ef6d69d054719a07dd13bee *man/plot_rarefaction.Rd
4b83ab9eedb5809878e874e79fc2d09f *man/plot_spot.Rd
009e172c6facea8fbd2bc11ce5881e05 *man/plot_spot.Rd
e919614161dcea0bf192ead3c078cf69 *man/pueblo.Rd
e79e7e2494edafc93f319208dae1801d *man/rarefaction.Rd
6d662eb73960e1a4e1a382ad300fa2d3 *man/reexports.Rd
dddb1d74a308abee447aca3b5385a257 *man/resample.Rd
53834e138042913169656d22b0b41e68 *man/richness.Rd
724285d5a065c11c518d89251731d7ce *man/seriograph.Rd
aa2fc60f126070d2e4900996e895a872 *man/seriograph.Rd
41b98b65003b8f8706fe92decf5b54ff *man/similarity.Rd
9b856c2b3c1b5a0c67feb3e00d4f3a3b *man/simulate.Rd
fbb7460a6d76a260eb1be2d2dc6b3846 *man/tabula-deprecated.Rd
c3d750b597d3ff0e0406066b3fb449d5 *man/tabula-package.Rd
d5edb8dbf36ce66b43579c894ff3b0c5 *man/tabula-package.Rd
cbe2993070ab3723a55bb60c6a09f232 *man/test_diversity.Rd
2f192878a489dcc98482f22305e7de00 *man/turnover.Rd
e57110b5fd5b34052d683a1993ef5548 *man/woodland.Rd
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
@@ -1,3 +1,7 @@
# tabula 3.0.1
## Enhancements
* Omit axes labels where they would abut or overlap previously drawn labels.

# tabula 3.0.0
## Bugfixes & changes
* Fix handling of missing values in heterogeneity index (#27).
Expand Down
3 changes: 2 additions & 1 deletion R/AllGenerics.R
Expand Up @@ -1048,7 +1048,8 @@ setGeneric(
#' See `seriograph()`.
#' @param fill The color for filling the bars.
#' @param border The color to draw the borders.
#' @param axes A [`logical`] scalar: should axes be drawn on the plot?
#' @param axes A [`logical`] scalar: should axes be drawn on the plot? It will
#' omit labels where they would abut or overlap previously drawn labels.
#' @param ... Currently not used.
#' @return
#' `plot_ford()` is called it for its side-effects: it results in a graphic
Expand Down
2 changes: 1 addition & 1 deletion R/plot_diceleraas.R
Expand Up @@ -45,7 +45,7 @@ setMethod(

## Save and restore
mar <- graphics::par("mar")
mar[2] <- inch2line(lab, cex = cex.axis) + 0.5
mar[2] <- arkhe::inch2line(lab, cex = cex.axis) + 0.5
old_par <- graphics::par(mar = mar)
on.exit(graphics::par(old_par))

Expand Down
19 changes: 11 additions & 8 deletions R/plot_ford.R
Expand Up @@ -29,12 +29,12 @@ setMethod(
font.axis <- graphics::par("font.axis")

## Save and restore
d <- inch2line("M", cex = cex.axis)
d <- arkhe::inch2line("M", cex = cex.axis)
mfrow <- graphics::par("mfrow")
mar <- graphics::par("mar")
mar[1] <- 3
mar[2] <- inch2line(lab_row, cex = cex.axis)
mar[3] <- inch2line(lab_col, cex = cex.axis)
mar[2] <- arkhe::inch2line(lab_row, cex = cex.axis)
mar[3] <- arkhe::inch2line(lab_col, cex = cex.axis)
mar[4] <- 0

old_par <- graphics::par(mfrow = mfrow, mar = mar)
Expand Down Expand Up @@ -76,14 +76,17 @@ setMethod(

## Construct axis
if (axes) {
graphics::mtext(lab_row, side = 2, at = seq_row, las = 2, padj = 0.5,
cex = cex.axis, col.axis = col.axis, font = font.axis)
graphics::mtext(lab_col, side = 3, at = unique(data$x), las = 2, padj = 0.5,
cex = cex.axis, col.axis = col.axis, font = font.axis)
graphics::axis(side = 2, at = seq_row, labels = lab_row, las = 2,
lty = 0, cex.axis = cex.axis, col.axis = col.axis,
font.axis = font.axis)
graphics::axis(side = 3, at = unique(data$x), labels = lab_col, las = 2,
lty = 0, cex.axis = cex.axis, col.axis = col.axis,
font.axis = font.axis)

x_axis <- data$x[which.max(data$value)]
graphics::axis(side = 1, at = c(x_axis - 0.2, x_axis + 0.2), labels = FALSE)
graphics::axis(side = 1, at = x_axis, labels = scale_pc(0.2), tick = FALSE)
graphics::axis(side = 1, at = x_axis, labels = arkhe::label_percent(0.2),
tick = FALSE)
}

if (weights) {
Expand Down
32 changes: 18 additions & 14 deletions R/plot_matrix.R
Expand Up @@ -25,7 +25,8 @@
#' @param drop_zero A [`logical`] scalar: should zeros be discarded?
#' @param col A vector of colors.
#' @param midpoint A [`numeric`] value specifying the data midpoint.
#' @param axes A [`logical`] scalar: should axes be drawn on the plot?
#' @param axes A [`logical`] scalar: should axes be drawn on the plot? It will
#' omit labels where they would abut or overlap previously drawn labels.
#' @param legend A [`logical`] scalar: should a legend be displayed?
#' @param asp A length-one [`numeric`] vector, giving the aspect ratio
#' \eqn{y/x}.
Expand Down Expand Up @@ -57,13 +58,13 @@ plot_matrix <- function(object, panel, diag = TRUE, upper = TRUE, lower = TRUE,
font.axis <- graphics::par("font.axis")

## Save and restore
d <- inch2line("M", cex = cex.axis)
d <- arkhe::inch2line("M", cex = cex.axis)
old_par <- graphics::par("mar", "plt")
on.exit(graphics::par(old_par))

mar_left <- inch2line(lab_row, cex = cex.axis)
mar_top <- inch2line(lab_col, cex = cex.axis)
mar_right <- if (legend) inch2line("999%", cex = cex.axis) else d
mar_left <- arkhe::inch2line(lab_row, cex = cex.axis)
mar_top <- arkhe::inch2line(lab_col, cex = cex.axis)
mar_right <- if (legend) arkhe::inch2line("999%", cex = cex.axis) else d
graphics::par(mar = c(d, mar_left, mar_top, mar_right))

## Open new window
Expand Down Expand Up @@ -101,17 +102,19 @@ plot_matrix <- function(object, panel, diag = TRUE, upper = TRUE, lower = TRUE,

## Construct axis
if (axes) {
graphics::mtext(lab_row, side = 2, at = seq_row, las = 2, padj = 0.5,
cex = cex.axis, col.axis = col.axis, font = font.axis)
graphics::mtext(lab_col, side = 3, at = seq_col, las = 2, padj = 0.5,
cex = cex.axis, col.axis = col.axis, font = font.axis)
graphics::axis(side = 2, at = seq_row, labels = lab_row, las = 2,
lty = 0, cex.axis = cex.axis, col.axis = col.axis,
font.axis = font.axis)
graphics::axis(side = 3, at = seq_col, labels = lab_col, las = 2,
lty = 0, cex.axis = cex.axis, col.axis = col.axis,
font.axis = font.axis)
}

## Legend
if (legend) {
legend <- attr(data, "legend")
legend_image <- grDevices::as.raster(legend$colors)
legend_y <- scale_range(legend$at) * n + 0.5
legend_y <- arkhe::scale_range(legend$at) * n + 0.5

graphics::rasterImage(legend_image, xleft = m + 1, ybottom = max(legend_y),
xright = m + 1.5, ytop = min(legend_y))
Expand Down Expand Up @@ -187,10 +190,11 @@ panel_tiles <- function(x, y, color, ...) {
panel_spot <- function(x, y, z, color, type, ...) {
radius <- abs(z * 0.45)
for (i in seq_along(x)) {
plot_circle(x = x[i], y = y[i], radius = radius[i], col = color[i],
border = color[i])
arkhe::circle(x = x[i], y = y[i], radius = radius[i],
col = color[i], border = color[i])
if (type == "ring") {
plot_circle(x = x[i], y = y[i], radius = 0.45, col = NA, border = "black")
arkhe::circle(x = x[i], y = y[i], radius = 0.45,
col = NA, border = "black")
}
}
}
Expand Down Expand Up @@ -303,7 +307,7 @@ prepare <- function(object, diag = TRUE, upper = TRUE, lower = TRUE,

legend_lab[!is.element(legend_lab, legend_brk)] <- NA
attr(data, "legend") <- list(
labels = if (freq) scale_pc(legend_lab) else legend_lab,
labels = if (freq) arkhe::label_percent(legend_lab) else legend_lab,
at = legend_pos,
colors = legend_col
)
Expand Down

0 comments on commit 2cf6f79

Please sign in to comment.