-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
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
How to change the color of log2 fold change bars? #136
Comments
|
Hi @marwa38 , Unfortunately, the colour of log2 fold change bars is hardcoded in the function. So you might just have to run your own plot function manually. The warning error is probably because the errorbar plot function scales both the fill and colour manually while the main aesthetics is just fill. I would just ignore the error. About the order of the bar, I think it is a ggplot2 specific thing. It basically plots the first datapoint according to your factor before the second (virtually ordering from zero to max y value). So the pyloric comes first before the distal in the order of the bars (e.g imaging that y is from 0 to 1. so the first value is placed closest to zero and the the other values comes after -> this is how I think about it). Alternatively, you could make the plot manually and use position_dodge2(reverse=TRUE) as position argument in the geom bar function. Truly I am not sure how you can modify these using the plot variable from the plot errorbar function. So I personally doing my plots myself. |
@PeterUgbanu Thanks so much for your reply.
That exactly what happened and I tried yesterday. |
Hi all
Once of my paper colors for the groups in comparison is the same as the color of log2 fold change bars, any advice how to chnage it? as it is confusing.
here is the code and the figure
another side warning note that I am getting not sure it is affecting my figures etc, is
although I converted the column
metadata_MMV_ds_py$Region
to factoranother point that I noticed is that although I changed the levels to be in a specific order pyloric then distal that doesn't change that the pyloric bars be above the distal bars although they changed the order in the legend as I changed to (pyloric then distal, orginally was distal above then pyloric down in the legend). I think there is something that need to change in the function
pathway_errorbar()
?Thanks
Marwa
The text was updated successfully, but these errors were encountered: