Skip to contents

[Maturing]

Funksjonen brukes i ggplot-kall og konverterer akselabels til å vise tall med tusenskille (standard er " ") og ønsket antall desimaler (standard er 2).

Usage

akse_tall_format(antall_desimaler = 2, decimal.mark = ",", big.mark = " ", ...)

Arguments

antall_desimaler

Hvor mange desimaler skal vises.

decimal.mark

Instilling for desimaltegn. Standard er ",".

big.mark

Instilling for tusenskille. Standard er " ".

...

Ytterligere argumenter.

Value

En funksjon med spesifiserte innstillinger for tallformat.

Examples

# Pakke for å laga figurar
library(ggplot2)
library(tibble)
#> 
#> Attaching package: ‘tibble’
#> The following object is masked from ‘package:rapwhale’:
#> 
#>     num

a = tibble(
  x = rnorm(100, 7500, 1000),
  y = runif(100, 0, 1)
)

ggplot(a, aes(x = x, y = y)) +
  geom_point() +
  scale_x_continuous(labels = akse_tall_format(antall_desimaler = 0)) +
  scale_y_continuous(labels = akse_prosent_format(antall_desimaler = 1))