The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Visualizing multiple datasets with scatterbar

Dee Velazquez and Jean Fan

2024-11-22

Visualizing multiple datasets with scatterbar

This tutorial demonstrates how to visualize multiple datasets together, utilizing the package patchwork.

Below we can load in our datasets provided by scatterbar and create the respective scatterbars using those datasets and save them to a variable.

library(scatterbar)
library(ggplot2)

data("mOB")
data("adult_mouse_brain_ffpe")

# Basic scatterbar plot with default settings
p1 <- scatterbar(mOB$data, mOB$xy) + coord_fixed()
#> Calculated size_x: 1.24034734589208
#> Calculated size_y: 0.930260509419063
#> Applied padding_x: 0
#> Applied padding_y: 0
p2 <- scatterbar(adult_mouse_brain_ffpe$prop, adult_mouse_brain_ffpe$pos) + coord_fixed()
#> Calculated size_x: 302.260275014085
#> Calculated size_y: 323.465991707814
#> Applied padding_x: 0
#> Applied padding_y: 0

We can then load in patchwork and visualize both scatterbars in one plot.

library(patchwork)
p1 + p2

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.