# AxisInDollars: Build Better Looking Axis Labels for US Dollars In openintro: Data Sets and Supplemental Functions from 'OpenIntro' Textbooks and Labs

 AxisInDollars R Documentation

## Build Better Looking Axis Labels for US Dollars

### Description

Convert and simplify axis labels that are in US Dollars.

### Usage

```AxisInDollars(side, at, include.symbol = TRUE, simplify = TRUE, ...)
```

### Arguments

 `side` An integer specifying which side of the plot the axis is to be drawn on. The axis is place as follows: 1 = below, 2 = left, 3 = above and 4 = right. `at` The points at which tick-marks are to be drawn. `include.symbol` Whether to include a dollar or percent symbol, where the symbol chosen depends on the function. `simplify` For dollars, simplify the amount to use abbreviations of `"k"`, `"m"`, `"b"`, or `"t"` when numbers tend to be in the thousands, millions, billions, or trillions, respectively. `...` Arguments passed to `axis`

### Value

The numeric locations on the axis scale at which tick marks were drawn when the plot was first drawn.

### Author(s)

David Diez

`buildAxis` `AxisInDollars` `AxisInPercent`

### Examples

```
x <- sample(50e6, 100)
hist(x, axes = FALSE)
AxisInDollars(1, pretty(x))
```

openintro documentation built on March 18, 2022, 6:17 p.m.