Closed thomasp85 closed 3 years ago
Thanks Thomas for pointing this out.
I can reproduce the error once the v3.3.4-rc branch of ggplot2 is installed.
> plot(myModel, "expected")
Error: Free scales cannot be mixed with a fixed aspect ratio
Run `rlang::last_error()` to see where the error occurred.
In addition: Warning messages:
1: In type.convert.default(X[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
2: In type.convert.default(X[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
The incriminated function is plotMyMatrix
, which is in fact inherited from the sbm
package, for which you should/will probably have a reverse dependency error. This is called via the S3 plot method of object with class missSBM_fit
:
plot.missSBM_fit <- function(x, type = c("imputed", "expected", "meso", "monitoring"), dimLabels = list(row= 'node',col = 'node'), ...) {
stopifnot(is_missSBMfit(x))
type <- match.arg(type)
gg_obj <- switch(type,
"expected" = plotMyMatrix(x$fittedSBM$expectation, dimLabels, list(row = x$fittedSBM$memberships)),
"meso" = x$fittedSBM$plot("meso"),
"imputed" = plotMyMatrix(as.matrix(predict(x)), dimLabels, list(row = x$fittedSBM$memberships)),
"monitoring" = ggplot(x$monitoring, aes(x = .data$iteration, y = .data$elbo)) + geom_line() + theme_bw()
)
if (type != "meso") gg_obj ## return ggobject unless igraph is invoked
}
We are working on it. Thanks.
Julien
I was just about to open an issue in sbm - should I do that or do you have everything you need?
Thanks, we do have everything we need.
Dear @thomasp85,
Version 0.4.3 of sbm is now on CRAN https://CRAN.R-project.org/package=sbm and is compatible with version v3.3.4-rc of ggplot2. missSBM (which depends on sbm) should hopefully now passez the reverse dependency tests.
Hi
We are preparing the next version of ggplot2 and our reverse dependency tests shows an issue with missSBM. The issue revolves around tighter checks of theme settings in facet rendering and means that free scales in facets will error if the theme has a specified aspect ratio. This change results in an error when running the examples in the estimateMissSBM documentation.
The next release is available in the v3.3.4-rc branch if you need to test against it. We plan on releasing in the next week.
best Thomas