- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create colored Venn Diagrams?
Reading transparent Venn Diagrams is a little difficult due to transparency in all areas, therefore, we should create Venn Diagrams that has different color in each of the area. This will help us to easily read the diagram and also the diagram will be more appealing to viewers. We can do this by using venn.diagram function of VennDiagram package.
Installing and Loading VennDiagram package −
Example
install.packages(“VennDiagram”) library(VennDiagram)
Creating the colored Venn Diagram (Note: The colored diagram will be saved in default folder for R in your system, mostly it is documents folder) −
venn.diagram(list(x=1:10,y=7:12),fill=c("yellow","black"), + filename = "Example1.tiff")
Output
venn.diagram(list(x=1:10,y=7:12,z=9:16),fill=c("yellow","black","blue"), + filename = "Example2.tiff")
Output
venn.diagram(list(x=1:10,y=7:12,z=9:16,a=15:20),fill=c("yellow","black","blue","red"), + filename = "Example3.tiff")
Output
Advertisements