美文网首页
pie_addimages将图片添加到饼图中,R语言tastyp

pie_addimages将图片添加到饼图中,R语言tastyp

作者: youmigo | 来源:发表于2021-10-04 00:01 被阅读0次

    pie_addimages将图片添加到饼图中,R语言tastypie包简易饼图

    # Wed Sep 08 01:07:42 2021 edit
    # 字符编码:UTF-8
    # R 版本:R 4.1.1 x64 for window 11
    # cgh163email@163.com
    # 个人笔记不负责任,拎了个梨🍐🍈
    #.rs.restartR()
    require(testthat)
    
    rm(list = ls());gc()
    
    img5 <- jpeg::readJPEG(system.file("img", "pie.jpeg", package = "tastypie"))
    imgs2 <- list(img5, img5, img5)
    
    df2 <- data.frame(
      c("A", "B", "C"),
      c(300, 250, 600)
    )
    
    mypie2 <- pie_bake(df2, template = "rainbow1")
    mypie2
    ggplot2::ggsave('pie_addimages将图片添加到饼图中1.jpg',dpi=200)
    
    pie_addimages(
      mypie = mypie2,
      imglist = imgs2,
      perc = "right",
      lbl_col = "darkcyan",
      border_col = "orangered",
      title = "Example"
    )
    
    

    相关文章

      网友评论

          本文标题:pie_addimages将图片添加到饼图中,R语言tastyp

          本文链接:https://www.haomeiwen.com/subject/ixvmwltx.html