温馨提示×

温馨提示×

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

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

ggplot2的theme参数怎么设置

发布时间:2022-03-18 17:13:33 来源:亿速云 阅读:397 作者:iii 栏目:开发技术

这篇“ggplot2的theme参数怎么设置”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“ggplot2的theme参数怎么设置”文章吧。

ggplot2绘图theme参数设置 theme(line, rect, text, title, aspect.ratio, axis.title, axis.title.x,  axis.title.x.top, axis.title.y, axis.title.y.right, axis.text, axis.text.x,  axis....

ggplot2绘图theme参数设置

theme(line, rect, text, title, aspect.ratio, axis.title, axis.title.x,
  axis.title.x.top, axis.title.y, axis.title.y.right, axis.text, axis.text.x,
  axis.text.x.top, axis.text.y, axis.text.y.right, axis.ticks, axis.ticks.x,
  axis.ticks.y, axis.ticks.length, axis.line, axis.line.x, axis.line.y,
  legend.background, legend.margin, legend.spacing, legend.spacing.x,
  legend.spacing.y, legend.key, legend.key.size, legend.key.height,
  legend.key.width, legend.text, legend.text.align, legend.title,
  legend.title.align, legend.position, legend.direction, legend.justification,
  legend.box, legend.box.just, legend.box.margin, legend.box.background,
  legend.box.spacing, panel.background, panel.border, panel.spacing,
  panel.spacing.x, panel.spacing.y, panel.grid, panel.grid.major,
  panel.grid.minor, panel.grid.major.x, panel.grid.major.y, panel.grid.minor.x,
  panel.grid.minor.y, panel.ontop, plot.background, plot.title, plot.subtitle,
  plot.caption, plot.margin, strip.background, strip.placement, strip.text,
  strip.text.x, strip.text.y, strip.switch.pad.grid, strip.switch.pad.wrap, ...,
  complete = FALSE, validate = TRUE)
设定空白会利用函数element_blank()

参数设置内容继承自设置函数
line所有线属性 =element_line()
rect所有矩形区域属性 =element_rect()
text所有文本相关属性 =element_text()
title所有标题属性 =element_text()
axis.title坐标轴标题text=element_text()
axis.title.xx轴属性axis.title=element_text()
axis.title.yy轴属性axis.title=element_text()
axis.text坐标轴刻度标签属性text=element_text()
axis.text.x属性和继承和前面类似,不再重复 =element_text()
axis.text.y  =element_text()
axis.ticks坐标轴刻度线line=element_line()
axis.ticks.x  =element_line()
axis.ticks.y  =element_line()
axis.ticks.length刻度线长度  
axis.ticks.margin刻度线和刻度标签之间的间距  
axis.line坐标轴线line=element_line()
axis.line.x  =element_line()
axis.line.y  =element_line()
legend.background图例背景rect=element_rect()
legend.margin图例边界  
legend.key图例符号 =element_rect()
legend.key.size图例符号大小  
legend.key.height图例符号高度  
legend.key.width图例符号宽度  
legend.text图例文字标签 =element_text()
legend.text.align图例文字标签对齐方式0为左齐,1为右齐 
legend.title图例标题text=element_text()
legend.title.align图例标题对齐方式  
legend.position图例位置left, right, bottom, top, 两数字向量 
legend.direction图例排列方向"horizontal" or  "vertical" 
legend.justification居中方式center或两数字向量 
legend.box多图例的排列方式"horizontal" or  "vertical" 
legend.box.just多图例居中方式  
panel.background绘图区背景rect=element_rect()
panel.border绘图区边框rect=element_rect()
panel.margin分面绘图区之间的边距  
panel.grid绘图区网格线line=element_line()
panel.grid.major主网格线 =element_line()
panel.grid.minor次网格线 =element_line()
panel.grid.major.x  =element_line()
panel.grid.major.y  =element_line()
panel.grid.minor.x  =element_line()
panel.grid.minor.y  =element_line()
plot.background整个图形的背景 =element_rect()
plot.title图形标题 =element_text()
plot.margin图形边距top, right, bottom, left 
strip.background分面标签背景rect=element_rect()
strip.text分面标签文本text=element_text()
strip.text.x  =element_text()
strip.text.y  =element_text()

以上就是关于“ggplot2的theme参数怎么设置”这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注亿速云行业资讯频道。

向AI问一下细节

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

AI