rose_text: Add Text to Rose map

Description Usage Arguments Value Examples

Description

Add Text to Rose map

Usage

1
2
3
4
5
6
7
8
9
rose_text(mapping = NULL, data = NULL, center = c(0, 0),
  outer.r = 1.05, n = 1000, round = 360, angle_string = NULL,
  angle_id = NULL, coord_string = NULL, coord_id = NULL,
  disappear_string = NULL, disappear_id = NULL, translate.1 = NULL,
  trans_h.2 = NULL, trans_v.3 = NULL, trans_al.4 = NULL,
  rotate.5 = 0, zoom.6 = NULL, mirror.7 = NULL, mirror_h.8 = NULL,
  mirror_v.9 = NULL, position = "identity", ..., parse = FALSE,
  check_overlap = FALSE, na.rm = FALSE, show.legend = NA,
  angle = NA, inherit.aes = TRUE)

Arguments

mapping

mapping

data

data, must be a dataframe

center

center coordinate, must be two numbers

outer.r

the radius of text circle, default is 1.05

n

the number of points, which will build a circle to help locate the text

round

the round of map, which should be 0-360, default is 360.

angle_string

change angle by string, which should be s1;s2:angle

angle_id

change angle by id, which can be 1:2;3:angle

coord_string

change coordinate by string, which can be s1;s2:0.1;0.2

coord_id

change coordinate by id, which can be 1:2;3:0.1;0.2

disappear_string

disappear by string, which can be s1;s2

disappear_id

disappear by id, which can be 1:2;3

translate.1

Operation to whole text, which is should be two numbers for x and y values

trans_h.2

Operation to whole text, which is should be one number

trans_v.3

Operation to whole text, which is should be one number

trans_al.4

Operation to whole text, which is should be two numbers for slope and intercept values

rotate.5

Operation to whole text, which is should be one number for angle

zoom.6

Operation to whole text, which is should be one number for ratio

mirror.7

Operation to whole text, which is should be two numbers for slope and intercept values

mirror_h.8

Operation to whole text, which is should be one number

mirror_v.9

Operation to whole text, which is should be one number

position

position

...

passed to parameters

parse

default is FALSE

check_overlap

default is FALSE

na.rm

default is FALSE

show.legend

default is FALSE

angle

default is NA

inherit.aes

default is TRUE

Value

text

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(ggrose)
set.seed(2020)
df=data.frame(r=rnorm(30))
ggplot(df)+
    stat_rose()

ggplot(df)+
    stat_rose(aes(petal=r,fill=r))+
    rose_text(aes(label=round(r)))

ggplot(df)+
    stat_rose(aes(petal=r,fill=r))+
    rose_text(aes(petal=r,label=round(r)))

yikeshu0611/ggrose documentation built on March 20, 2020, 9:56 p.m.