scale_color_csgo: CSGo color palette - color

Description Usage Arguments Value Examples

View source: R/scale_color_csgo.R

Description

A color palette (color) to be used with ggplot2

Usage

1
scale_color_csgo(discrete = TRUE, ...)

Arguments

discrete

logical: if TRUE it will generate a discrete pallet otherwise a continuous palette

...

all available options of the discrete_scale function or scale_color_gradientn both from ggplot2

Value

scale_color object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
library(CSGo)
library(ggplot2)
library(dplyr)
library(showtext)

## Loading Google fonts (https://fonts.google.com/)
font_add_google("Quantico", "quantico")

df %>%
 top_n(n = 10, wt = kills) %>%
 ggplot(aes(x = name_match, size = shots)) +
 geom_point(aes(y = kills_efficiency, color = "Kills Efficiency")) +
 geom_point(aes(y = hits_efficiency, color = "Hits Efficiency")) +
 geom_point(aes(y = hits_to_kill, color = "Hits to Kill")) +
 ggtitle("Weapon Efficiency") +
 ylab("Efficiency (%)") +
 xlab("") +
 labs(color = "Efficiency Type", size = "Shots") +
 theme_csgo(
   text = element_text(family = "quantico"),
   panel.grid.major.x = element_line(size = .1, color = "black",linetype = 2)
 ) +
 scale_color_csgo()
 
## End(Not run)

CSGo documentation built on May 8, 2021, 1:06 a.m.