Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/emilhvitfeldt/unitscales

Adding additional ggplot2 scales that adds units
https://github.com/emilhvitfeldt/unitscales

Last synced: about 2 months ago
JSON representation

Adding additional ggplot2 scales that adds units

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# unitscales

[![Travis build status](https://travis-ci.org/EmilHvitfeldt/unitscales.svg?branch=master)](https://travis-ci.org/EmilHvitfeldt/unitscales)
[![Codecov test coverage](https://codecov.io/gh/EmilHvitfeldt/unitscales/branch/master/graph/badge.svg)](https://codecov.io/gh/EmilHvitfeldt/unitscales?branch=master)

The goal of unitscales is to add commonly used scale transformation to [ggplot2](https://ggplot2.tidyverse.org/).

## Installation

The development version is available from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("EmilHvitfeldt/unitscales")
```

## Example

This is a basic example which shows you how to solve a common problem:

```{r example}
library(ggplot2)
library(unitscales)
```

```{r}
ggplot(women, aes(weight, height)) +
geom_point() +
scale_y_length(base = "inch", system = "imperial", ignore = "yard") +
scale_x_mass(base = "pound", system = "imperial")
```
q