ArgoCanada / argoFloats

Tools for analyzing collections of oceanographic Argo floats
https://argocanada.github.io/argoFloats/index.html
17 stars 7 forks source link

plot(x, which="QC") won't always plot in R studio #559

Closed j-harbin closed 2 years ago

j-harbin commented 2 years ago

This issue is due to margins.

library(argoFloats)
data(index)
argos <- readProfiles(getProfiles(subset(index,1:10)))
plot(argos, which="QC")

Screen Shot 2022-04-21 at 11 13 13 AM

dankelley commented 2 years ago

I get the same, unless I make the plot panel of Rstudio a bit bigger than I normally use.

I propose you set better margins near https://github.com/ArgoCanada/argoFloats/blob/559d1f3b067324b2d22056073d36c3c9b6d45a44/R/plot.R#L949

The y labels are a bit long, but I don't think we want to abbreviate "temperature", and I don't see a way to say "% Good" in fewer characters. In other words, I think fixing the margin is the right thing.

Be sure to set it up to reset the value upon exit (as we are doing with mfrow). CRAN wants that from plot() functions.

j-harbin commented 2 years ago

Fixed in commit 719423ee0f73adfacbc07046330ab7558ec3e2ed of develop.