Skip to content
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

Strange units single wavelet plot in compare_wvar #13

Open
stefangachter opened this issue Jun 9, 2021 · 2 comments
Open

Strange units single wavelet plot in compare_wvar #13

stefangachter opened this issue Jun 9, 2021 · 2 comments

Comments

@stefangachter
Copy link

If I call compare_wvar with a single wavelet variance object, then the plot is "degenerated", see image below.

  • Title is default one, instead of the one specified
  • x-axis label is default one, instead of specified one
  • y-axis label is default one, instead of the specified one
  • Units are default ones, instead of the specified ones
  • Units show strange characters
    image
    Call of the function as follow:
    plotObj = do.call(compare_wvar, c(waveletVariances, list(split=FALSE, auto.label.wvar=FALSE, axis.x.label=xLabel, axis.y.label=yLabel, units=c(unitGyroVar, unitAccVar), title=title, legend.label=legendLables)))
    Same call with two wavelte variance objects:
    image
@lionelvoirol
Copy link
Member

Hi,
Thanks for noticing this issue Stefan.
Could you please provide a reproducible example so we can investigate the bug and solve it?
Thanks!

@stefangachter
Copy link
Author

Here, an example:

library(imudata)
library(gmwm)

imuObj <- list()
waveletVariances <- list()

data(adis_16405_imu1)
imuObj[length(imuObj)+1] <- list(imu(adis_16405_imu1, gyros=1:3, acc=4:6, axis=c('X', 'Y', 'Z'), freq=100))
waveletVariances[length(waveletVariances)+1] <- list(wvar.imu(imuObj[[length(imuObj)]]))


title = 'ADIS 16405 IMU1'
xLabel = 'Time Scale (s)'
yLabel = 'Variance'
unitAcc = 'm/s^2'
unitGyro = 'deg/s'
unitAccVar = paste('(', unitAcc, ')^2', sep='')
unitGyroVar = paste('(', unitGyro, ')^2', sep='')
legendLables = NULL

plotObj = do.call(compare_wvar, c(waveletVariances, list(split=FALSE, auto.label.wvar=FALSE, axis.x.label=xLabel, axis.y.label=yLabel, units=c(unitGyroVar, unitAccVar), title=title, legend.label=legendLables)))
plot(plotObj)

data(adis_16405_imu2)
imuObj[length(imuObj)+1] <- list(imu(adis_16405_imu2, gyros=1:3, acc=4:6, axis=c('X', 'Y', 'Z'), freq=100))
waveletVariances[length(waveletVariances)+1] <- list(wvar.imu(imuObj[[length(imuObj)]]))

title = 'ADIS 16405 IMU1 and IMU2'
legendLables = c('IMU1', 'IMU2')

plotObj = do.call(compare_wvar, c(waveletVariances, list(split=FALSE, auto.label.wvar=FALSE, axis.x.label=xLabel, axis.y.label=yLabel, units=c(unitGyroVar, unitAccVar), title=title, legend.label=legendLables)))
plot(plotObj)

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants