我正在做基因序列分析,我有一个基因组,我为这个基因组绘制了基因和它们的蛋白质,但是这个图很忙,当我把我的R标记标记出来的时候,它被切断了。不知道从哪里开始如何调整这一点,任何帮助都将不胜感激。这是它的代码:
library(tidyverse)
library(ggplot2)
library(devtools)
install_github("wilkox/gggenes")
library(gggenes)
gene_prediction <-read.csv('~/genome1table.csv', header=TRUE, sep=',')
gene_names<-c(gene_prediction$Gene)
starts <- c(gene_prediction$Start)
ends<-c(gene_prediction$End)
strand<-c(gene_prediction$Strand)
genome_name<-rep('Genome',62)
dfgenome1map<-data.frame(genome_name=genome_name, name=gene_names, start=starts, end=ends, category=category, strand=strand)
dfgenome1map$direction<- ifelse(dfgenome1map$strand == "+", 1, -1)
ggplot(dfgenome1map, aes(xmin=start, xmax=end, y='',
fill=category,
label=gene_names, forward= direction)) +
geom_gene_arrow() +
geom_gene_label(align = "center") +
labs(x='locus (bp)', fill='VOG category')+
theme_genes() +
scale_color_continuous() +
theme(axis.title.y = element_blank(),
axis.title.x=element_text())这在我的R标记中看起来是这样的,但是蛋白质的关键应该更大:

发布于 2018-05-03 14:18:15
你把大块贴在这里了吗?
您可以使用以下方法调整绘图大小:
opts_chunk$set(fig.width = 15, fig.height = 15)15是一个高价值的例子。在RStudio的最后一个版本中,右上角有块选项。
输出文件是什么?HTML/docx/pdf?
还可以在启动.Rmd ( YAML)时指定选项:
---
title: "xxx"
output:
html_document:
fig_width: 15
fig_height: 15
fig_caption: true
---https://stackoverflow.com/questions/50156685
复制相似问题