Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/earowang/unlayout

Unlayout the layout of HTML widgets
https://github.com/earowang/unlayout

Last synced: 23 days ago
JSON representation

Unlayout the layout of HTML widgets

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%"
)
```

# unlayout

Hmm, I'm just not there yet for laying out plots when doing EDA, and hence `unlayout()` first (and drag them towards a better layout ;)).

This package is an html widget that simply wraps the `draggable()` method from the [interact.js](https://interactjs.io) library. It works with or without Shiny.

## Installation

You can install the dev version of unlayout from Github with:

``` r
# install.packages("remotes")
remotes::install_github("earowang/unlayout")
```

## Get started

```{r unlayout, eval = FALSE}
library(unlayout)
library(plotly)
p1 <- plot_ly(economics, x = ~ pop, width = 350)
p2 <- plot_ly(economics, x = ~ date, y = ~ pop, height = 240, width = 600)
p3 <- plot_ly(z = ~ volcano)
unlayout(p1, p2, p3)
```

![unlayout-gif](man/figures/unlayout.gif)

## Related works

Please check out [shinyjqui](https://github.com/Yang-Tang/shinyjqui) for rich interactable features, including draggable, resizable, and sortable.