Skip to content

Commit 2cba5df

Browse files
avoiding to trigger the note because of variables not defined... --> .data$ pronoun for the win
1 parent 15043ea commit 2cba5df

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

R/enrichment_map_static.R

+6-6
Original file line numberDiff line numberDiff line change
@@ -182,25 +182,25 @@ plot_emap_static <- function(emg,
182182

183183
## edges first, so they don't cover anything
184184
ggraph::geom_edge_link0(
185-
aes(edge_width = width_not_scaled),
185+
aes(edge_width = .data$width_not_scaled),
186186
## adding some transparency here
187187
edge_colour = scales::alpha("lightgrey", 0.7)) +
188188

189189
## hull on top, so that the nodes still are in the "native color"
190190
ggforce::geom_mark_hull(
191-
aes(x, y,
192-
fill= cluster_label,
191+
aes(.data$x, .data$y,
192+
fill= .data$cluster_label,
193193
## why not having the border of the hull too "colored in sync"
194-
color = cluster_label,
195-
label = cluster_label),
194+
color = .data$cluster_label,
195+
label = .data$cluster_label),
196196
label.fill = scales::alpha("white", 0.1),
197197
concavity = 10,
198198
expand = unit(7, "mm"),
199199
alpha = 0.15
200200
) +
201201

202202
## handling the individual nodes at the end
203-
ggraph::geom_node_point(aes(size = size, fill = I(V(emg)$color)), shape = 21, color = "black") + # I(V(emg_for_gggraph)$ # Adjust border thickness) + # Use `I()` to prevent scaling
203+
ggraph::geom_node_point(aes(size = .data$size, fill = I(V(emg)$color)), shape = 21, color = "black") + # I(V(emg_for_gggraph)$ # Adjust border thickness) + # Use `I()` to prevent scaling
204204
# ggplot2::scale_fill_identity() +
205205
ggplot2::scale_size_continuous(range = c(7, 25)) + # Adjust min and max sizes
206206

0 commit comments

Comments
 (0)