Learn R Programming

eulerr (version 1.0.0)

plot.eulerr: eulerr plots

Description

Plot Euler diagrams from eulerr using base R graphics.

Usage

"plot"(x, fill_opacity = 0.4, polygon_args = list(), text_args = list(), mar = c(2, 2, 2, 2), ...)

Arguments

x
Specifications for a Euler diagram in the form of a object of class 'eulerr'
fill_opacity
Opacity for the fill colors between 0 and 1. Values beyond this range will be clamped to [0, 1] without warning.
polygon_args
Arguments for polygon, which is used to draw the circles.
text_args
Arguments for text, which is used to draw the text.
mar
Margins for the plot area, set viapar()[["mar"]].
...
Arguments for plot (that draws the plot area).

Details

If no color is specified to polygon_args, fills will be colored using a predefined palette taken from qualpal.

See Also

plot, polygon, text eulerr

Examples

Run this code
fit <- eulerr(c(A = 10, B = 5, "A&B" = 3))
plot(fit, fill_opacity = .7)

# Change to italic roman font, remove borders and switch colors
plot(fit,
     polygon_args = list(col = c("dodgerblue4", "darkgoldenrod1"),
                         border = "transparent"),
     text_args = list(font = 8))

# Plot without fills and distinguish sets with border types instead
plot(fit,
     polygon_args = list(lty = c("solid", "dotted"), col = "transparent"),
     text_args = list(cex = 2, font = 2))

Run the code above in your browser using DataLab