You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am not part of the SCP team, but I have reviewed the SCP code. The cause of this issue may lie in the internal function ExpressionStatPlot being called by FeatureStatPlot.
In terms of the usage of theme_args, the code includes: p <- p + do.call(theme_use, theme_args) + theme(aspect.ratio = aspect.ratio, axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1)..., which means that when you set the angle of axis.text.x through theme_args in FeatureStatPlot, it will be overridden by the default settings of the function. Therefore, to achieve your desired effect, you can use FeatureStatPlot(myobject, stat.by = c("nFeature_RNA"), group.by = "celltype", palette = "Blues", stack = T, legend.position = 'none', theme_args = theme(axis.text.x = element_text(color="#993333"))) + theme(axis.text.x = element_text(angle = 90)) or directly set the theme after obtaining the ggplot object from FeatureStatPlot like FeatureStatPlot(myobject, stat.by = c("nFeature_RNA"), group.by = "celltype", palette = "Blues",stack = T,legend.position = 'none')+ theme(axis.text.x = element_text(color="#993333",angle=90))
Hello, SCP team,
I have an unresolved question and would appreciate your guidance.
Why does setting the angle parameter not work in the theme function? This question has puzzled me for a long time
FeatureStatPlot(myobject, stat.by = c("nFeature_RNA"), group.by = "celltype", palette = "Blues",stack = T,legend.position = 'none',theme_args = theme(axis.text.x = element_text(color="#993333",angle=90)))
Thank you very much for your response.
Sophia
The text was updated successfully, but these errors were encountered: