-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plotProfile() should use units (if known) #981
Comments
Some keyhole coding tests have revealed a way to do this (my test case yielded #982, since closed) and I may have time to make a provisional fix tomorrow afternoon, or Friday afternoon, or on Saturday. I really think this is quite important, in the sense that we can now read a lot of SBE things that can have whacky units, and so we can now make plots that will have incorrect units on the axes, unless I fix this. Therefore, my idea is to try to get this fixed up before early next week, then to have a week of leaving oce alone for day-to-day tests, and then a release on the June 18. Actually, we could even be a bit more cautious and release on St Jean Baptiste Day, for a little culture. |
Just because I'm logging out for the night, I want to note that we also have an issue test, as follows, and it does something good in library(oce)
data(section)
ctd <- section[["station", 1]]
if (!interactive()) png("981.png")
par(mfrow=c(2,1))
plotProfile(ctd, xtype="nitrite")
mtext("Expect unit [umol/kg]", side=3, line=2, adj=1, col='magenta', font=2)
ctd[["metadata"]]$units$nitrite <- list(unit=expression(nmol/g), scale="")
plotProfile(ctd, xtype="nitrite")
mtext("Expect unit [nmol/g]", side=3, line=2, adj=1, col='magenta', font=2)
if (!interactive()) dev.off() |
I think part of fixing this will also involve making |
Time for a checklist of things to change in
|
It's not often I reference my blog here, but in this case I will, because it shows a solution I found after 2 hours of saying bad words at my computer: blog |
I've made progress in the commit c3c3a16
|
Also, and this is confusing because I can only test a few things with 981a.R, |
I've merged |
I am not planning on altering |
I'm closing this, and opening one for |
Of course this should be done throughout
oce
but I don't want an issue that will stay "in play" for a month. I'd prefer to tackle it a bit at a time. Also,plotProfile()
is probably the most important case to consider, because this is where the majority of the unit variation lies. Below is a screenshot demonstrating that e.g. oxygen really could use a unit!The text was updated successfully, but these errors were encountered: