We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello ! This is my R code
brain <- tibble( region = c("thalamus proper", "putamen", "caudate", "pallidum", "hippocampus", "amygdala"), p = c("0.00022", "0.0262", "0.000945", "8.6E-04", "6.3E-03", "0.006093"), )
brainx <- brain %>% filter(p < 0.05) ggplot(brainx) + geom_brain(atlas = aseg, side = "coronal", hemi = "left", aes(fill = p)) + scale_fill_viridis_c(option = "cividis", direction = -1) + theme_void() + labs(title = "R basal")
"An error message similar to the image above appeared. What might be wrong?"
The text was updated successfully, but these errors were encountered:
Hi!
The error message is saying that you are trying to apply a continuous scale to a discrete value.
You've entered the p values with quotes, meaning R thinks they are a categorical scale. Unquote your numbers and everything should be fine.
This is not a ggseg specific thing, but ggplot2.
https://stackoverflow.com/questions/29278153/plotting-with-ggplot2-error-discrete-value-supplied-to-continuous-scale-on-c
Sorry, something went wrong.
Thank you very much ! It works !!!!!!!!
No branches or pull requests
Hello !
This is my R code
brain <- tibble( region = c("thalamus proper", "putamen", "caudate", "pallidum", "hippocampus",
"amygdala"),
p = c("0.00022", "0.0262", "0.000945", "8.6E-04", "6.3E-03", "0.006093"),
)
brainx <- brain %>% filter(p < 0.05)
ggplot(brainx) + geom_brain(atlas = aseg, side = "coronal", hemi = "left", aes(fill = p)) +
scale_fill_viridis_c(option = "cividis", direction = -1) +
theme_void() +
labs(title = "R basal")
"An error message similar to the image above appeared. What might be wrong?"
The text was updated successfully, but these errors were encountered: