Skip to content

Commit

Permalink
Add support for R option ggspectra.pc.out to autoplot() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
aphalo committed Apr 25, 2024
1 parent 5e2c8c3 commit efee4af
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 33 deletions.
4 changes: 2 additions & 2 deletions R/autoplot-calibration-spct.R
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ autoplot.calibration_spct <-
default = list(UVC(), UVB(), UVA(), PhR())),
range = NULL,
unit.out = "ignored",
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = "mean",
span = NULL,
wls.target = "HM",
Expand Down Expand Up @@ -381,7 +381,7 @@ autoplot.calibration_mspct <-
unit.out = "ignored",
norm = getOption("ggspectra.normalize",
default = "skip"),
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
plot.data = "as.is",
idfactor = TRUE,
facets = FALSE,
Expand Down
4 changes: 2 additions & 2 deletions R/autoplot-cps-spct.r
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ autoplot.cps_spct <-
range = NULL,
norm = "skip",
unit.out = NULL,
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = "mean",
span = NULL,
wls.target = "HM",
Expand Down Expand Up @@ -380,7 +380,7 @@ autoplot.cps_mspct <-
range = NULL,
norm = "skip",
unit.out = NULL,
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
idfactor = TRUE,
facets = FALSE,
plot.data = "as.is",
Expand Down
21 changes: 14 additions & 7 deletions R/autoplot-filter-spct.r
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,8 @@ autoplot.filter_spct <-
default = "update"),
plot.qty = getOption("photobiology.filter.qty",
default = "transmittance"),
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out",
default = FALSE),
label.qty = NULL,
span = NULL,
wls.target = "HM",
Expand Down Expand Up @@ -1365,7 +1366,8 @@ autoplot.filter_mspct <-
default = "update"),
plot.qty = getOption("photobiology.filter.qty",
default = "transmittance"),
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out",
default = FALSE),
plot.data = "as.is",
idfactor = TRUE,
facets = FALSE,
Expand Down Expand Up @@ -1532,7 +1534,8 @@ autoplot.reflector_spct <-
default = "update"),
plot.qty = getOption("photobiology.reflector.qty",
default = "reflectance"),
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out",
default = FALSE),
label.qty = NULL,
span = NULL,
wls.target = "HM",
Expand Down Expand Up @@ -1626,7 +1629,8 @@ autoplot.reflector_mspct <-
norm = getOption("ggspectra.normalize", default = "update"),
plot.qty = getOption("photobiology.reflector.qty",
default = "reflectance"),
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out",
default = FALSE),
plot.data = "as.is",
idfactor = TRUE,
facets = FALSE,
Expand Down Expand Up @@ -1796,7 +1800,8 @@ autoplot.object_spct <-
range = NULL,
norm = "skip",
plot.qty = "all",
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out",
default = FALSE),
label.qty = NULL,
span = NULL,
wls.target = "HM",
Expand Down Expand Up @@ -1915,8 +1920,10 @@ autoplot.object_mspct <-
...,
range = NULL,
norm = "skip",
plot.qty = getOption("photobiology.filter.qty", default = "all"),
pc.out = FALSE,
plot.qty = getOption("photobiology.filter.qty",
default = "all"),
pc.out = getOption("ggspectra.pc.out",
default = FALSE),
plot.data = "as.is",
idfactor = TRUE,
facets = plot.qty == "all",
Expand Down
4 changes: 2 additions & 2 deletions R/autoplot-raw-spct.r
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ autoplot.raw_spct <-
default = list(UVC(), UVB(), UVA(), PhR())),
range = NULL,
unit.out = "counts",
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = "mean",
span = NULL,
wls.target = "HM",
Expand Down Expand Up @@ -412,7 +412,7 @@ autoplot.raw_mspct <-
norm = getOption("ggspectra.norm",
default = "skip"),
unit.out = "counts",
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
idfactor = TRUE,
facets = FALSE,
plot.data = "as.is",
Expand Down
4 changes: 2 additions & 2 deletions R/autoplot-response-spct.r
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ autoplot.response_spct <-
norm = getOption("ggspectra.norm", default = "update"),
unit.out = getOption("photobiology.radiation.unit",
default = "energy"),
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = NULL,
span = NULL,
wls.target = "HM",
Expand Down Expand Up @@ -717,7 +717,7 @@ autoplot.response_mspct <-
norm = getOption("ggspectra.norm",
default = "update"),
unit.out = getOption("photobiology.radiation.unit", default="energy"),
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
plot.data = "as.is",
facets = FALSE,
idfactor = TRUE,
Expand Down
4 changes: 2 additions & 2 deletions R/autoplot-source-spct.r
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ autoplot.source_spct <-
default = "update"),
unit.out = getOption("photobiology.radiation.unit",
default = "energy"),
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = NULL,
span = NULL,
wls.target = "HM",
Expand Down Expand Up @@ -805,7 +805,7 @@ autoplot.source_mspct <-
default = "update"),
unit.out = getOption("photobiology.radiation.unit",
default = "energy"),
pc.out = FALSE,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
idfactor = TRUE,
facets = FALSE,
plot.data = "as.is",
Expand Down
4 changes: 2 additions & 2 deletions man/autoplot.calibration_spct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/autoplot.cps_spct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/autoplot.filter_spct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/autoplot.object_spct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/autoplot.raw_spct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/autoplot.reflector_spct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/autoplot.response_spct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/autoplot.source_spct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit efee4af

Please sign in to comment.