作图相关

R语言-循环产生变量名并赋值,应用到 ggolot2 循环作图:https://www.cnblogs.com/JoAnnal/p/9921737.html


R语言中相关图的绘制方法简介:http://blog.sciencenet.cn/blog-3406804-1173194.html


ggplot2 in R:https://github.com/xinyu-intel/R/blob/master/visualization.md


Plotting clustering trees:https://cran.r-project.org/web/packages/clustree/vignettes/clustree.html


R 语言 绘制横向的直方图(条状图):https://blog.csdn.net/rav009/article/details/40149405


在ggplot中嵌入额外字体:https://zhuanlan.zhihu.com/p/40034137

library(extrafont)

library(calibrate)

library(ggplot2)

library(Cairo)

font_import()

loadfonts(device="win")

fonts()

x <- 1:10

y <- 1:10

test_data <- data.frame(x , y,number = seq(1,10))

ggplot(test_data,aes(x,y)) +

  geom_point(shape = 1,size = 9) +

  geom_text(aes(label = number),hjust=0.5, vjust=0.4,family = "Latin Modern Roman",size = 6)+

  xlim(c(1, 10)) +

  ylim(c(1, 10)) +

  theme_light() +

  theme(

    axis.text.x = element_text(family = "Latin Modern Roman",size = 20),

    axis.text.y = element_text(family = "Latin Modern Roman",size = 20),

    axis.title = element_text(family = "Latin Modern Roman",size = 20)

  ) +

  ylab(expression(italic("y"))) +

  xlab(expression(italic("x")))

ggsave("fig1.pdf", width = 22, height = 20, units = "cm", device=cairo_pdf)


(五)基本图形参数:https://www.jianshu.com/p/62e71f30d0d6

你可能感兴趣的:(作图相关)