Skip to content
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

Change the node color in cnetplot #40

Merged
merged 1 commit into from
Mar 13, 2020
Merged

Change the node color in cnetplot #40

merged 1 commit into from
Mar 13, 2020

Conversation

huerqiang
Copy link
Contributor

之前的cnetplot作图时,当遇到foldchange有正有负时,foldchange接近于0的节点会偏离中间颜色。
此次对cnetplot节点的颜色进行了调整,以使其在foldchange有正有负时,foldchange为正的基因在blue到red渐变,foldchange为负的基因在blue到green渐变,foldchange接近于0时,节点颜色为blue。

代码中所做的更改为:
1、cnetplot.enrichResult函数的scale_color_gradientn改为scale_colour_gradient2
2、fc_palette函数用不到了,在utilities.R中将它注释掉了。

@GuangchuangYu
Copy link
Member

跑五个例子出来看看:

  • 有正有负
  • 只有正数
  • 正数 和 0
  • 只有负数
  • 负数 和 0

@GuangchuangYu
Copy link
Member

@huerqiang

@GuangchuangYu GuangchuangYu merged commit 63df529 into YuLab-SMU:master Mar 13, 2020
GuangchuangYu pushed a commit that referenced this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants