R语言作图- 主题设置
一:ggplot2和ggtheme主题类型1. ggplot2自带的两个主题theme_grey() 、theme_bw()2. ggthemes包的十个主题主题名描述theme_base类似于 ggplot 默认设置theme_calc类似 LibreOffice Calc 图表theme_economist类似经济类图表theme_economist_white类似经济类图表theme_excel类似经典excel图表theme_few简洁型theme_fivethirtyeight类似于 http://fivethirtyeight.com的图theme_foundation这个主题的设计是为了基础建立新的主题,而不是直接使用。theme_foundation是一个完整的主题,只有最小的元素定义。它相比于theme_gray或theme_bw更容易通过扩展创建新的主题,因为那些主题和有着较深层次的主题定义。theme_gdocs类似默认的 Google Docs Charttheme_hcHighcharts JStheme_igary主题与白色面板和灰色背景。theme_map一个简洁的地图主题theme_panderpander的默认主题theme_solarized可以看 http://ethanschoonover.com/solarized 的介绍theme_solarized_2同上theme_solid主题删除所有non-geom元素(线条、文本等),这个主题只有所需的几何对象。theme_stata基于 Stata graph schemes的主题theme_tufte基于数据墨水最大化和图形设计的Edward Tufte 定量信息的视觉显示。没有边界,没有轴线,没有网格。这个主题与geom_rug或geom_rangeframe结合效果最好。theme_wsjWall Street Journal themeggpubr共6种主题可以通过 ?theme_pubr() 查看

# 用法如下:ggdotchart(dfm, x = "name", y = "mpg", color = "cyl", # Color by groups palette = c("#00AFBB", "#E7B800", "#FC4E07"), # Custom color palette sorting = "ascending", # Sort value in descending order add = "segments", # Add segments from y = 0 to dots ggtheme = theme_pubr() # ggplot2 theme )参考文献GitHub - jrnold/ggthemes: Additional themes, scales, and geoms for ggplot2ggplot2——主题篇_九茶-CSDN博客ggplot2-ggtheme样例表_炫炫有牛腩 的博客-CSDN博客ggplot2 - Easy Way to Change Graphical Parameters - Articles - STHDAggpubr: Publication Ready Plots - Articles - STHDA