geom_ellipse_cm: Geom Layer for Ellipse with Absolute Size

Description Usage Arguments Details Examples

View source: R/geom_ellipse_cm.R

Description

This layer uses centimeter as unit to draw ellipse so that its size and shape will not be influenced by the coordinate systems (even when a polar system is used).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
geom_ellipse_cm(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Arguments

mapping

aes mapping.

data

data.

stat

stat.

position

position.

na.rm

logical, whether to remove NA values.

show.legend

whether to show legend.

inherit.aes

logical, whether to inherit aes from ggplot().

...

additional parameters.

Details

Accepted properties are:

Examples

1
2
3
4
5
6
library(ggplot2)
dat=data.frame(x=c(1, 3, 5, 7, 9), y=rep(5, 5)) 
ggplot(dat)+xlim(0, 11)+ylim(1, 9)+
	geom_ellipse_cm(aes(x=x, y=y), fill="red", ab=seq(1, 4, length.out=5))  
ggplot(dat)+xlim(0, 11)+ylim(1, 9)+
	geom_ellipse_cm(aes(x=x, y=y, fill=factor(x)), ab=3, angle=c(0, pi/4, pi/3, pi/2, 0.75*pi))

plothelper documentation built on July 2, 2020, 4:03 a.m.