Skip to content

Commit

Permalink
Merge branch 'develop-0.3.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
aphalo committed Feb 29, 2024
2 parents 6aa9cd4 + 3169b5f commit c957bd5
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: ggspectra
Type: Package
Title: Extensions to 'ggplot2' for Radiation Spectra
Version: 0.3.12.9000
Date: 2024-02-28
Date: 2024-02-29
Authors@R:
c(
person("Pedro J.", "Aphalo", email = "pedro.aphalo@helsinki.fi", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-3385-972X")),
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ provides the most automatic approach.
``` r
library(ggspectra)
autoplot(sun.spct)
#> [1] NA
```

![](man/figures/README-example0-1.png)<!-- -->
Expand All @@ -42,6 +43,7 @@ Some degree of flexibility can be obtained by passing arguments.

``` r
autoplot(sun.spct, annotations = c("+", "title:where:when"), unit.out = "photon")
#> [1] NA
```

![](man/figures/README-example1-1.png)<!-- -->
Expand Down Expand Up @@ -117,8 +119,7 @@ publications, please cite according to:

``` r
citation("ggspectra")
#>
#> To cite package 'ggspectra' in publications, please use:
#> To cite package ‘photobiology’ in publications use:
#>
#> Aphalo, Pedro J. (2015) The r4photobiology suite. UV4Plants Bulletin,
#> 2015:1, 21-29. DOI:10.19232/uv4pb.2015.1.14
Expand Down
65 changes: 65 additions & 0 deletions inst-not/benchmark-autoplot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
library(ggspectra)
# library(profvis)

p1 <- autoplot(sun.spct)

ggpg <- ggplotGrob(p1)

# profvis(
# ggpg <- ggplotGrob(p1),
# interval = 0.005,
# rerun = TRUE
#)

p2 <- autoplot(sun.spct, annotations = "")

ggpg <- ggplotGrob(p2)

# profvis(
# ggpg <- ggplotGrob(p2),
# interval = 0.005,
# rerun = TRUE
# )

p3 <- autoplot(sun.spct, annotations = "peaks")

ggpg <- ggplotGrob(p3)

p4 <- autoplot(sun.spct, annotations = "colour.guide")

ggpg <- ggplotGrob(p4)

p5 <- autoplot(sun.spct, annotations = "summaries")

ggpg <- ggplotGrob(p5)


gc()
bench::mark(ggplotGrob(p1),
ggplotGrob(p2),
ggplotGrob(p3),
ggplotGrob(p4),
ggplotGrob(p5),
check = FALSE,
min_iterations = 10)


p10 <- autoplot(sun_evening.spct)
p11 <- autoplot(sun_evening.mspct)
p12 <- autoplot(sun_evening.spct, annotations = "")
p13 <- autoplot(sun_evening.mspct, annotations = "")
p14 <- autoplot(sun_evening.mspct, annotations = "", norm = "skip")
p15 <- autoplot(sun_evening.spct, facets = 2)
p16 <- autoplot(sun_evening.mspct, facets = 2)

gc()
bench::mark(ggplotGrob(p10),
ggplotGrob(p11),
ggplotGrob(p12),
ggplotGrob(p13),
ggplotGrob(p14),
ggplotGrob(p15),
ggplotGrob(p16),
check = FALSE,
min_iterations = 10)

Binary file modified man/figures/README-example1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c957bd5

Please sign in to comment.