Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/emilhvitfeldt/unitscales
- Owner: EmilHvitfeldt
- License: other
- Created: 2019-06-03T21:57:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-10T00:42:20.000Z (over 5 years ago)
- Last Synced: 2024-07-31T19:26:08.711Z (5 months ago)
- Language: R
- Size: 58.6 KB
- Stars: 19
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
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