dpc10ster / RJafrocFrocBook

FROC methodology explained with R-examples
Creative Commons Zero v1.0 Universal
3 stars 2 forks source link

polygon not found error occurs in Actions, not on Mac #1

Closed dpc10ster closed 2 years ago

dpc10ster commented 2 years ago

Commit 6c69a46df91115f2c444908468b8990479e71331

Quitting from lines 312-316 (03-empirical.Rmd) Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : polygon edge not found

Note that this error does not occur when running Actions on RJafroc repository.

Thanks,

dpc10ster commented 2 years ago

The error is intermittent; this time it occurs in a different place.

Commit ab8eeed941aeb19f0d87b8b5a193dcf939464e8b

renderbook #58: Commit ab8eeed pushed by dpc10ster

dpc10ster commented 2 years ago

Commit 8fb3213f01cad2554bb387cc42b1bb8d2faed70a

detail of second error cited above:

Quitting from lines 340-341 (22-optim-op-point.Rmd) Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : polygon edge not found

The second error is reproducible; solved in file optim-op-point0-helper.R which is used in 22-optim-op-pt.Rmd. Basically labeling a figure is problematic in some operating systems, due to font problems; search for DpcBugFix 8/28/22

Change

        plotArr[[i]] <- ggplot2::ggplot(
          df_froc, 
          aes(x = NLF, y = LLF)) + 
          geom_line() +
          scale_x_continuous(limits = c(0,lambdaP)) + 
          scale_y_continuous(limits = c(0,1)) +
          ggtitle(paste0("mu = ", mu, ", nu = ", nuP, ", lambda = ", lambdaP))

to

        plotArr[[i]] <- ggplot2::ggplot(
          df_froc, 
          aes(x = NLF, y = LLF)) + 
          geom_line() +
          scale_x_continuous(limits = c(0,lambdaP)) + 
          scale_y_continuous(limits = c(0,1)) 
dpc10ster commented 2 years ago

pdf file is made correctly, including labels in Figures Commit c57281f06d883a7e48db114b663d1b18fc4d7511 Seeing error again when building HTML:

Quitting from lines 378-379 (22-optim-op-point.Rmd) Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  : 
  polygon edge not found

Need to take out all labels from Figures; add them to the Figure caption; ugh!

dpc10ster commented 2 years ago

Possible solutions here

No one addresses this issue occurring on GitHub Actions, only on their own machines

dpc10ster commented 2 years ago

see commit d902a0a3fe97172a28fd4d08e1b5e5df749b7a0b; removed labels in Figures in optim-op-point-helpers.R; need to label them in captions

dpc10ster commented 2 years ago

see commit 23c4191464a1f2d8f095d9f57e6ce540b59a539b This worked