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

add parameter node_label_scale for emapplot #62

Merged
merged 6 commits into from Sep 30, 2020
Merged

add parameter node_label_scale for emapplot #62

merged 6 commits into from Sep 30, 2020

Conversation

huerqiang
Copy link
Contributor

1、增加了一个参数node_label_scale来调节emapplot中节点label的大小
2、将label字体改成了阴影字体

@GuangchuangYu
Copy link
Member

为什么啥都要scale,比直接用个fontsize参数有什么好处?

@huerqiang
Copy link
Contributor Author

老师,我把node_label_scale改成了node_label_size。 之前是想到有些用户可能对字体的绝对大小没什么概念,不看文档的话不知道我们使用的默认大小是多少,于是我就用个node_label_scale来作为相对大小的参数。

@GuangchuangYu
Copy link
Member

都可以,无所谓的。最主要是要保持一致性。

另外,不要每次都加大版本号。我一般是X.Y.Z.991,加后面的991,然后等我要push到bioconductor的时候,我再改为X.Y.Z+1.

NEWS.md Outdated
# enrichplot 1.9.4

+ add `node_label_size` parameter to adjust the size of node label in `emapplot` function (2020-09-18, Fri)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

news.md也要记录一下有什么新的东西。

@GuangchuangYu
Copy link
Member

GuangchuangYu commented Sep 19, 2020

我说你为什么要用node_label_size,而不直接用fontsize呢?就是为了兼顾cnetplot,然后你还搞成一样的。

cnetplot有category和gene两种点。要分开参数设置,我觉得你的参数呢,又臭又长了,而且很乱。

参数命名得有规则,比如fontsize_category, fontsize_gene,一看就知道是设置category还是gene,而且都以fontsize_打头的话,假设我想调字体大小,我打下了fontsize_然后按下tab,就可以参数补齐,有几种选择给我选。

你参照一下https://www.statmethods.net/advgraphs/parameters.html中的cex.XX参数。

你这段时间改过的可视化函数,参数都重新搞一下,之前是越搞越乱。统一一下。包括之前XX_scale,可以改成scale_XX,这样,一类东西以一样的开头,像geom做为图层开始一样。

@GuangchuangYu
Copy link
Member

当所有东西都是cex_之后,少数的fontsize就又跟人家不一样了。也改成cex吧。比如cex_label_category, cex_label_gene

@huerqiang
Copy link
Contributor Author

老师,我在新的提交中把参数名称改成了cex_label_category, cex_label_gene和cex_label_group

@GuangchuangYu
Copy link
Member

GuangchuangYu commented Sep 27, 2020 via email

@huerqiang
Copy link
Contributor Author

老师,我在代码中加入提前声明常量了。另外在cnetplot的图中,之前是先打一层category节点的label,再打一层gene节点的label。这样的话当gene节点的label和category节点的label有重叠时,category的label就会被遮盖住。category的label应当比gene节点的label更重要一些,因此我把它们的顺序换了一下。

@GuangchuangYu GuangchuangYu merged commit 42fc238 into YuLab-SMU:master Sep 30, 2020
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