Closed wangkangcheng closed 3 years ago
Hi!
THanks for testing out package. To alter the colour, change the column name for the colour
argument to the name of the column that contains the p-values.
library(ggseg3d)
library(dplyr)
someData = data.frame(
region = c("Left-Amygdala", "Left-Hippocampus",
"Left-Thalamus-Proper","Left-Caudate",
"Left-Putamen", "Left-Pallidum", "Left-VentralDC"),
p = sample(seq(0,.5,.001), 7),
stringsAsFactors = FALSE)
ggseg3d(.data = someData,
atlas = aseg_3d,
na.alpha= .5,
colour = "p") %>%
add_glassbrain("left") %>%
pan_camera("left lateral") %>%
remove_axes()
wow, cool picture, thanks. How to write the name of left-accumbens ? I try it with "Left-Accumbens-area". It reports no error. Does it right ?
Best
one more question about the colorbar:
dd = ggseg3d(.data = someData, atlas = aseg_3d, na.alpha= .5, colour = "p") %>% add_glassbrain("left") %>% pan_camera("left lateral") %>% remove_axes()
then, I try to change the colorbar and limit with the following command. It reports NULL. How can I update the command ? thanks dd + scale_fill_gradient2(low="blue",mid = "gray", high="red", limits=c(-2.5,3))
You are trying to apply a ggplot2 scale to a plotly plot. ggseg3d is not based on ggplot (despite the name).
Please have a look at the user guides for how to use ggseg3d https://lcbc-uio.github.io/ggseg3d/articles/ggseg3d.html
thanks
Hi, After reading the usage of ggseg3d, I do not find the option for writing the p values into the function. Can you share your method of showing 3d subcortical view with p value?
thanks
ggseg3d( .data = NULL, atlas = "dk_3d", surface = "LCBC", hemisphere = c("right", "subcort"), label = "region", text = NULL, colour = "colour", palette = NULL, na.colour = "darkgrey", na.alpha = 1, show.legend = TRUE, options.legend = NULL )
library(ggseg3d) library(dplyr)
someData = data.frame( region = c("amygdala", "hippocampus", "thalamus proper","caudate", "putamen", "pallidum", "ventral DC"), p = sample(seq(0,.5,.001), 7), stringsAsFactors = FALSE)
ggseg3d(atlas = aseg_3d,na.alpha= .5) %>% add_glassbrain("left") %>% pan_camera("left lateral") %>% remove_axes()