From 21ea7116625b74e73b3669a8f746261a7f4b2933 Mon Sep 17 00:00:00 2001 From: Alex Hayes Date: Wed, 31 Jul 2024 12:45:31 -0500 Subject: [PATCH] Plotting fix --- R/plotting.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/plotting.R b/R/plotting.R index 04c630a..f50f413 100644 --- a/R/plotting.R +++ b/R/plotting.R @@ -46,6 +46,12 @@ expectation.directed_factor_model <- function(model, ...) { #' plot_expectation <- function(model) { EA <- as.matrix(expectation(model)) + if (is.null(rownames(EA))) { + rownames(EA) <- 1:nrow(EA) + } + if (is.null(colnames(EA))) { + colnames(EA) <- 1:ncol(EA) + } plot_dense_matrix(EA) }