LoginSignup
4
3

More than 5 years have passed since last update.

丸が横に並んだベン図で枠の上に数字が書いたやつを書きたかった

Last updated at Posted at 2013-06-20

デフォルトはこうですが

R
library (Venn Diagram)
png("fig_a.png")
fig_a <- venn.diagram(
  x = list( A = 1:150, B = 121:180 ),
  filename =NULL,
  cex = 3,
    cat.cex = 3,
    )
grid.newpage()
grid.draw(fig_a)
dev.off()

fig_a.png

こんなかんじで

R
png("fig_b.png")
fig_b <- venn.diagram(
  x = list( "150" = 1:150, "60" = 121:180 ),
    label.col = "white",                            # ラベル(数値)を白にして見えなくする
  filename =NULL,
  cex = 3,
    cat.cex = 3,
    cat.dist = c(0, 0),
    cat.pos = c(0, 0),
    )
grid.newpage()
grid.draw(fig_b)
dev.off()

fig_b.png

重なりのところだけ表示させたかったら

png("fig_c.png")
fig_c <- venn.diagram(
  x = list( "150" = 1:150, "60" = 121:180 ),
    label.col = c("white","black","white"),
  filename =NULL,
  cex = 3,
    cat.cex = 3,
    cat.dist = c(0, 0),
    cat.pos = c(0, 0),
    )
grid.newpage()
grid.draw(fig_c)
dev.off()

fig_c.png

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3