diff --git a/R/plot_RLum.Results.R b/R/plot_RLum.Results.R index df2fffd49..b142929f4 100644 --- a/R/plot_RLum.Results.R +++ b/R/plot_RLum.Results.R @@ -650,7 +650,7 @@ plot_RLum.Results<- function( poly.border<- FALSE } if(pdf.colors == "none") { - col.n<- NULL + col.n <- rgb(0,0,0,0) poly.border<- TRUE } @@ -1028,10 +1028,9 @@ plot_RLum.Results<- function( ##get data df <- get_RLum(object = object, data.object = "dose.rate") - ##reduce the size for plotting, more than 100 points makes no sense - if(nrow(df)>100) { + ##reduce the size for plotting, more than 100 points make no sense + if(nrow(df)>100) df <- df[seq(1,nrow(df), length = 100),] - } ##plot settings plot.settings <- list( diff --git a/tests/testthat/test_calc_FiniteMixture.R b/tests/testthat/test_calc_FiniteMixture.R index b2cf03e35..5597d2cff 100644 --- a/tests/testthat/test_calc_FiniteMixture.R +++ b/tests/testthat/test_calc_FiniteMixture.R @@ -70,5 +70,19 @@ test_that("check class and length of output", { n.components = 3, verbose = TRUE), "The model produced NA values: either the input data are inapplicable") + }) + + ## plot with plot_RLum.Results + t <- expect_s4_class(calc_FiniteMixture( + ExampleData.DeValues$CA1, + sigmab = 0.2, + n.components = 2:3, + grain.probability = FALSE, + trace = FALSE, + plot = FALSE, + main = "Plot title", + verbose = FALSE), "RLum.Results") + plot_RLum.Results(t, pdf.colors = "none") + }) diff --git a/tests/testthat/test_calc_SourceDoseRate.R b/tests/testthat/test_calc_SourceDoseRate.R index d13b1b92c..9f62775c4 100755 --- a/tests/testthat/test_calc_SourceDoseRate.R +++ b/tests/testthat/test_calc_SourceDoseRate.R @@ -39,6 +39,16 @@ test_that("General tests", { predict = 10 )) + ## produce more than 100 rows + t <- expect_silent(calc_SourceDoseRate( + measurement.date = "2018-01-02", + calib.date = "2014-12-19", + calib.dose.rate = 0.0438, + calib.error = 0.0019, + predict = 150 + )) + expect_silent(plot_RLum.Results(t)) + ##Gy/min as unit expect_silent(calc_SourceDoseRate( measurement.date = "2018-01-02",