All Projects → GuangchuangYu → Hexsticker

GuangchuangYu / Hexsticker

✨ Hexagon sticker in R

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Hexsticker

Ghibli
Studio Ghibli colour palettes
Stars: ✭ 227 (-51.08%)
Mutual labels:  ggplot2, rstats
ggchicklet
🀫 Create Chicklet (Rounded Segmented Column) Charts
Stars: ✭ 130 (-71.98%)
Mutual labels:  ggplot2, rstats
cusumcharter
Easier CUSUM control charts. Returns simple CUSUM statistics, CUSUMs with control limit calculations, and function to generate faceted CUSUM Control Charts
Stars: ✭ 17 (-96.34%)
Mutual labels:  ggplot2, rstats
Econocharts
Microeconomics/macroeconomics charts in ggplot2
Stars: ✭ 161 (-65.3%)
Mutual labels:  ggplot2, rstats
Ggextra
📊 Add marginal histograms to ggplot2, and more ggplot2 enhancements
Stars: ✭ 299 (-35.56%)
Mutual labels:  ggplot2, rstats
Calendr
Ready to print calendars with ggplot2
Stars: ✭ 161 (-65.3%)
Mutual labels:  ggplot2, rstats
DataViz-Teaching
📈 Visualizations for DataViz Teaching
Stars: ✭ 29 (-93.75%)
Mutual labels:  ggplot2, rstats
Soccer ggplots
Soccer/football analytics blog posts & data viz from the World Cup, Premier League, Copa America, and beyond. Using ggplot2, ggsoccer, & more. (Est. June 2018) ****Please look at the README for best version of the code!****
Stars: ✭ 115 (-75.22%)
Mutual labels:  ggplot2, rstats
Ggpomological
🍑 Pomological plot theme for ggplot2
Stars: ✭ 293 (-36.85%)
Mutual labels:  ggplot2, rstats
Ggpointdensity
📈 📊 Introduces geom_pointdensity(): A Cross Between a Scatter Plot and a 2D Density Plot.
Stars: ✭ 286 (-38.36%)
Mutual labels:  ggplot2, rstats
Patchwork
The Composer of ggplots
Stars: ✭ 2,002 (+331.47%)
Mutual labels:  ggplot2, rstats
Ggsignif
Easily add significance brackets to your ggplots
Stars: ✭ 322 (-30.6%)
Mutual labels:  ggplot2, rstats
Complex Upset
A library for creating complex UpSet plots with ggplot2 geoms
Stars: ✭ 147 (-68.32%)
Mutual labels:  ggplot2, rstats
Plotly
An interactive graphing library for R
Stars: ✭ 2,096 (+351.72%)
Mutual labels:  ggplot2, rstats
Gganimate
A Grammar of Animated Graphics
Stars: ✭ 1,744 (+275.86%)
Mutual labels:  ggplot2, rstats
scclusteval
Single Cell Cluster Evaluation
Stars: ✭ 57 (-87.72%)
Mutual labels:  ggplot2, rstats
Colormap
R package to generate colors from a list of 44 pre-defined palettes
Stars: ✭ 55 (-88.15%)
Mutual labels:  ggplot2, rstats
Ggbernie
A ggplot2 geom for adding Bernie Sanders to ggplot2
Stars: ✭ 96 (-79.31%)
Mutual labels:  ggplot2, rstats
layer
Create stacked tilted maps
Stars: ✭ 97 (-79.09%)
Mutual labels:  ggplot2, rstats
Ggpage
Creates Page Layout Visualizations in R 📄📄📄
Stars: ✭ 306 (-34.05%)
Mutual labels:  ggplot2, rstats

hexSticker: create hexagon sticker in R

CRAN_Status_Badge

✍️ Author

Guangchuang YU https://guangchuangyu.github.io

School of Basic Medical Sciences, Southern Medical University

saythanks


⏬ Installation

Install the hexSticker package via CRAN:

install.packages("hexSticker")

You can also install the package via the Github repository.

# install.package("remotes")   #In case you have not installed it.
remotes::install_github("GuangchuangYu/hexSticker")

Fail to install

imageMagick

imageMagick is required for installing hexSticker. If you have not installed it, please try the following approaches.

Fail to load ‘sysfonts’

In Mac OS, you may need to re-install sysfont to properly load it.

Be sure to install xquartz first.

brew update && brew install homebrew/cask/xquartz

Examples

sticker function will produce a file with dimension exactly for printing according to http://hexb.in/sticker.html

base plot

library(hexSticker)
s <- sticker(~plot(cars, cex=.5, cex.axis=.5, mgp=c(0,.3,0), xlab="", ylab=""),
          package="hexSticker", p_size=20, s_x=.8, s_y=.6, s_width=1.4, s_height=1.2,
          filename="inst/figures/baseplot.png")

The sticker() will generate a figure specified by the filename parameter. The output of the sticker() function is a ggplot object, e.g. the s variable in the above example. Print the object, print(s), will display the image. However, the image may slightly different from the created image file since the graphic device size are different. To solve this issue, hexSticker package provides plot function to preview sticker. Try plot(s) :).

lattice

library(lattice)

counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
bwplot <- bwplot(counts ~ outcome | treatment, xlab=NULL, ylab=NULL, cex=.5,
                 scales=list(cex=.5), par.strip.text=list(cex=.5))
sticker(bwplot, package="hexSticker", p_size=20, s_x=1.05, s_y=.8, s_width=2, s_height=1.5,
        h_fill="#f9690e", h_color="#f39c12", filename="inst/figures/lattice.png")

ggplot2

library(ggplot2)

p <- ggplot(aes(x = mpg, y = wt), data = mtcars) + geom_point()
p <- p + theme_void() + theme_transparent()

sticker(p, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=1.3, s_height=1,
        filename="inst/figures/ggplot2.png")

image file

imgurl <- system.file("figures/cat.png", package="hexSticker")
sticker(imgurl, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=.6,
        filename="inst/figures/imgfile.png")

Google fonts

library(showtext)
## Loading Google fonts (http://www.google.com/fonts)
font_add_google("Gochi Hand", "gochi")
## Automatically use showtext to render text for future devices
showtext_auto()

## use the ggplot2 example
sticker(p, package="hexSticker", p_size=22, s_x=1, s_y=.75, s_width=1.3, s_height=1,
        p_family = "gochi", filename="inst/figures/ggplot2-google-font.png")

💖 Stickers produced by hexSticker

If you use hexSticker and want your sticker to be listed here, please feel free to edit README.Rmd, and run rmarkdown::render("README.Rmd") in R to generate README.md.

Please put stickers in alphabet order.

Stickers for software packages

Stickers for events/workshops

Stickers for fun

Stickers for organizations

Print/order stickers

Sticker designers can make their stickers available via Sticker Mule.

Related Tools

  • badger: Query information and generate badge for using in README and GitHub Pages.
  • ggimage: Supports image files and graphic objects to be visualized in ‘ggplot2’ graphic system.
  • meme: Create Meme.
  • shadowtext: Create text grob with background shadow.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].