Skip to content

Commit e1cce8d

Browse files
committed
fix: renames g object to plot and adds print in correct place
1 parent 4515361 commit e1cce8d

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

R/tm_g_scatterplotmatrix.R

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ srv_g_scatterplotmatrix <- function(id,
386386
qenv,
387387
substitute(
388388
expr = {
389-
g <- lattice::splom(
389+
plot <- lattice::splom(
390390
ANL,
391391
varnames = varnames_value,
392392
panel = function(x, y, ...) {
@@ -410,7 +410,6 @@ srv_g_scatterplotmatrix <- function(id,
410410
alpha = alpha_value,
411411
cex = cex_value
412412
)
413-
print(g)
414413
},
415414
env = list(
416415
varnames_value = varnames,
@@ -429,7 +428,13 @@ srv_g_scatterplotmatrix <- function(id,
429428
qenv,
430429
substitute(
431430
expr = {
432-
plot <- lattice::splom(ANL, varnames = varnames_value, pch = 16, alpha = alpha_value, cex = cex_value)
431+
plot <- lattice::splom(
432+
ANL,
433+
varnames = varnames_value,
434+
pch = 16,
435+
alpha = alpha_value,
436+
cex = cex_value
437+
)
433438
},
434439
env = list(varnames_value = varnames, alpha_value = alpha, cex_value = cex)
435440
)
@@ -438,11 +443,11 @@ srv_g_scatterplotmatrix <- function(id,
438443
qenv
439444
})
440445

441-
decorated_output_q <- srv_transform_teal_data(id = "decorator", data = output_q, transformators = decorators)
442-
decorated_output_plot_q <- reactive(within(decorated_output_q(), print(plot)))
446+
decorated_output_q_no_print <- srv_transform_teal_data(id = "decorator", data = output_q, transformators = decorators)
447+
decorated_output_q <- reactive(within(decorated_output_q_no_print(), print(plot)))
443448
plot_r <- reactive({
444449
req(output_q()) # Ensure original errors are displayed
445-
decorated_output_plot_q()[["plot"]]
450+
decorated_output_q()[["plot"]]
446451
})
447452

448453
# Insert the plot into a plot_with_settings module

0 commit comments

Comments
 (0)