Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use R language to draw Wayne diagram

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "how to use R language to draw Wayne diagram". In daily operation, I believe many people have doubts about how to use R language to draw Wayne diagram. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to use R language to draw Wayne diagram"! Next, please follow the editor to study!

> install.packages ("VennDiagram")

> library (VennDiagram)

> A = 1PUR 150

> B = c (121purl 170pr 300PUR 320)

> C = c (20Rd 40Pol 141JV 200)

> Length_A Length_B Length_C Length_AB Length_BC Length_AC Length_ABC T grid.draw (T)

> T grid.draw (T)

> draw.pairwise.venn (area1=Length_A,area2=Length_B,cross.area=Length_AB,category=c ('Achievement grammatical B'), lwd=rep (1 red','green'), lty=rep (2 red','green'), col=c (' red','green'), fill=c ('red','green'), rotation.degree=90)

The picture drawn in this way is the same as that in the first way! Next, use draw.triple.venn to draw the Wayne diagram of three sets.

> draw.triple.venn (area1=Length_A, area2=Length_B, area3=Length_C,n12=Length_AB, n23=Length_BC, n13=Length_AC, n123 English ABC language category = c), col=c ('red','green','blue'), fill=c (' red','green','blue'), cat.col=c ('red','green','blue')

, reverse = FALSE)

The silly code is as follows:

> install.packages ("VennDiagram")

> library (VennDiagram)

> A B C venn.diagram (x=list (Tumor=A, Organoids=B, Primary=C), "My1.png", height = 450,450, resolution = 300, imagetype= "png", col= "white", fill=c (colors () [616], colors () [38], colors () [468]), alpha=c (0.6,0.6,0.6), lwd=c (1,1,1), cex=0, cat.dist=c (- 0.07,0.07,0.05), cat.pos=c (300,60,180) Cat.cex=0.45) the meaning of # height, width, resolution, etc., can be understood by referring to the help () function. Note here "My 1.png" is the name of the picture save file, if you do not want to save in the form of a file, then filename must be empty, that is, filename=NULL.

> D E F venn.diagram (x=list (Tumor=D, Organoids=F,Primary=E), "My2.png", height = 450,450, resolution = 300, imagetype= "png", col= "gray", fill=c (colors (), colors () [589], colors () [116]), alpha=c (0.6,0.6,0.6), lwd=0.5, cex=0, cat.dist=c (- 0.07,0.07,0.05), cat.pos=c (100,260,0), cat.cex=0.45 Cat.col= "black", rotation.degree=180)

> A B C D venn.diagram (x = list, filename = "My3.png", height = 450 resolution = 300, imagetype= "png", col = "transparent", fill = c ("cornflowerblue", "green", "yellow", "darkorchid1"), alpha = 0.5, label.col = c ("orange", "white", "darkorchid4", "white", "white") "darkblue", "white", "darkgreen", "white"), cex = 0.45 serif family = "serif", fontface = "bold", cat.col = c ("darkblue", "darkgreen", "orange", "darkorchid4"), cat.cex = 0.45 mint cat.pos = 0, cat.dist = 0.07 cat.col cat.fontfamily = "serif", rotation.degree = 270)

> A B C D venn.diagram (x = list, filename = "My4.png", height = 450, width = 450 resolution = 300, imagetype= "png", col= "transparent", fill=c ("cornflowerblue", "green", "yellow", "darkorchid1"), alpha = 0.50, cex=0.45, cat.cex=0.45)

> venn.diagram (x = list, filename = "My5.png", height = 450,450, resolution = 300, imagetype= "png", lwd=0.6, fill = c ("cornflowerblue", "green", "yellow", "darkorchid1"), cex=0.45, cat.cex=0.45)

Of course, Wayne can draw, the most important thing is to be able to analyze!

At this point, the study on "how to use R language to draw Wayne diagram" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report