R语言中怎么用ggplot2包绘制柱状图

发布时间:2022-03-21 14:38:38 作者:iii
来源:亿速云 阅读:456

这篇文章主要讲解了“R语言中怎么用ggplot2包绘制柱状图”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“R语言中怎么用ggplot2包绘制柱状图”吧!

ggplot2包绘制了展示基因在样本中表达量与数量的柱状图

使用方法:

Rscript lnc_exp.r -h
usage: lnc_exp.r [-h] -i exp_data [-l legend.position] [-o outdir] [-p prefix]
                 [-H height] [-W width]

lnc_exp_Histogram:https://www.亿速云.com/article/1552

optional arguments:
  -h, --help            show this help message and exit
  -i exp_data, --exp_data exp_data
                        input data file path[required]
  -l legend.position, --legend.position legend.position
                        Sets the location of the
                        legend[none,left,right,bottom,top,or two-element
                        numeric vector][optional,default top]
  -o outdir, --outdir outdir
                        output file directory[optional,default cwd]
  -p prefix, --prefix prefix
                        out file name prefix[optional,default lncRNA]
  -H height, --height height
                        the height of the heat map[optional,default 5]
  -W width, --width width
                        the width of the heat map[optional,default 5]

参数说明:

-i 输入基因表达矩阵文件,建议输入标准化过后的表达数据

#ID
S0-1
S0-2
S0-3
S12-1
S12-2
S12-3
T0-1
T0-2
XLOC_000173
0.249352
0.1533
0.499899
0.258562
0.174361
0.659209
0.647131
0.705749
XLOC_000195
0.0500286
0.029918
0
0.0674263
0
00.0682668
0.0121699
XLOC_000196
0.458015
0.938447
0.72592
0.28384
0.271833
0.316445
0.742948
0.744104

-l 指定图例的位置,可以设置成none,left,right,bottom,top,or two-element numeric vector

使用举例:

Rscript lnc_exp.r -i All_lnc_gene_fpkm.tsv -l top -p lnc_exp_Histogram

感谢各位的阅读,以上就是“R语言中怎么用ggplot2包绘制柱状图”的内容了,经过本文的学习后,相信大家对R语言中怎么用ggplot2包绘制柱状图这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!

推荐阅读:
  1. ggplot2包如何在R语言中使用
  2. 如何利用R语言的ggplot2包绘制KEGG气泡图

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

ggplot2 r语言

上一篇:vue如何管理请求加载状态

下一篇:vue如何实现Proxy跨域

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》