Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added three stickers to the readme #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,11 @@ sticker(p, package="hexSticker", p_size=22, s_x=1, s_y=.75, s_width=1.3, s_heigh
[<img src="https://raw.githubusercontent.com/paezha/macdown/master/man/figures/macdown.png" height="120"/>](https://github.com/paezha/macdown)
[<img src="https://raw.githubusercontent.com/rOpenSpain/mapSpain/master/man/figures/logo.png" height="120"/>](https://github.com/rOpenSpain/mapSpain)
[<img src="https://raw.githubusercontent.com/gpaux/Mediana/master/inst/figures/hexMediana.png" height="120"/>](https://github.com/gpaux/Mediana)
[<img src="https://github.com/nvietto/movienight/blob/master/man/figures/movienight.png" height="120"/>](https://github.com/nvietto/movienight)
[<img src="https://github.com/keblu/MSGARCH/raw/master/hexmsgarch_small.png" height="120"/>](https://github.com/keblu/MSGARCH)
[<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/MSnbase/MSnbase.png" height="120"/>](https://github.com/Bioconductor/BiocStickers/tree/master/MSnbase)
[<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/mzR/mzR_hl.png" height="120"/>](https://github.com/Bioconductor/BiocStickers/tree/master/mzR)
[<img src="https://github.com/nvietto/nopunintended/blob/master/man/logo.png" height="120"/>](https://github.com/nvietto/nopunintended)
[<img src="https://raw.githubusercontent.com/lbenz730/ncaahoopR/master/figures/logo.png" height="120"/>](https://github.com/lbenz730/ncaahoopR)
[<img src="https://shanmdphd.github.io/hex/ncarbe.png" height="120"/>](https://github.com/asancpt/ncarbe)
[<img src="https://user-images.githubusercontent.com/20061736/81393545-d662c680-9120-11ea-9963-a737f963bd8d.png" height="120"/>](https://mirkosignorelli.github.io/r.html)
Expand All @@ -239,6 +241,7 @@ sticker(p, package="hexSticker", p_size=22, s_x=1, s_y=.75, s_width=1.3, s_heigh
[<img src="https://raw.githubusercontent.com/jorvlan/open-visualizations/master/R/package_figures/rainclouds_highres.png" height="120"/>](https://github.com/jorvlan/raincloudplots)
[<img src="https://raw.githubusercontent.com/stevecondylios/rawr/master/man/figures/rawr.png" height="120"/>](https://github.com/stevecondylios/rawr)
[<img src="https://raw.githubusercontent.com/jwood000/RcppAlgos/main/man/figures/RcppAlgos-logo.png" height="120"/>](https://github.com/jwood000/RcppAlgos)
[<img src="https://github.com/nvietto/Rdune/blob/main/man/figures/logo.jpg" height="120"/>](https://github.com/nvietto/Rdune)
[<img src="https://github.com/potterzot/rnassqs/raw/master/inst/figures/rnassqs.png" height="120"/>](https://github.com/potterzot/rnassqs)
[<img src="https://raw.githubusercontent.com/prdm0/ropenblas/master/logo.png" height="120"/>](https://github.com/prdm0/ropenblas)
[<img src="https://raw.githubusercontent.com/ellessenne/rsimsum/master/man/figures/hex.png" height="120"/>](https://github.com/ellessenne/rsimsum)
Expand Down
72 changes: 40 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<!-- README.md is generated from README.Rmd. Please edit that file -->


# hexSticker: create hexagon sticker in R


[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/hexSticker?color=green)](https://cran.r-project.org/package=hexSticker)
[![](http://cranlogs.r-pkg.org/badges/grand-total/hexSticker?color=green)](https://cran.r-project.org/package=hexSticker)
[![](http://cranlogs.r-pkg.org/badges/hexSticker?color=green)](https://cran.r-project.org/package=hexSticker)
[![](http://cranlogs.r-pkg.org/badges/last-week/hexSticker?color=green)](https://cran.r-project.org/package=hexSticker)





## :writing_hand: Author

Guangchuang YU <https://yulab-smu.top>
Expand All @@ -16,18 +22,21 @@ School of Basic Medical Sciences, Southern Medical University
[![saythanks](https://img.shields.io/badge/say-thanks-ff69b4.svg)](https://saythanks.io/to/GuangchuangYu)
[![](https://img.shields.io/badge/follow%20me%20on-WeChat-green.svg)](https://guangchuangyu.github.io/blog_images/biobabble.jpg)

------------------------------------------------------------------------

----

## :arrow_double_down: Installation

Install the hexSticker package via CRAN:


``` r
install.packages("hexSticker")
```

You can also install the package via the Github repository.


``` r
# install.package("remotes") #In case you have not installed it.
remotes::install_github("GuangchuangYu/hexSticker")
Expand All @@ -37,48 +46,44 @@ remotes::install_github("GuangchuangYu/hexSticker")

### imageMagick

`imageMagick` is required for installing `hexSticker`. If you have not
installed it, please try the following
[approaches](https://www.imagemagick.org/script/download.php).
`imageMagick` is required for installing `hexSticker`. If you have not installed it, please try the following [approaches](https://www.imagemagick.org/script/download.php).

### Fail to load sysfonts
### Fail to load 'sysfonts'

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

Be sure to install `xquartz` first.


``` r
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>
> `sticker` function will produce a file with dimension exactly for printing according to
> <http://hexb.in/sticker.html>


### base plot


``` r
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)` :).
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)` :).

<img src="inst/figures/baseplot.png" height="300"/>

### lattice


``` r
library(lattice)

Expand All @@ -95,6 +100,7 @@ sticker(bwplot, package="hexSticker", p_size=20, s_x=1.05, s_y=.8, s_width=2, s_

### ggplot2


``` r
library(ggplot2)

Expand All @@ -107,8 +113,10 @@ sticker(p, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=1.3, s_heigh

<img src="inst/figures/ggplot2.png" height="300"/>


### image file


``` r
imgurl <- system.file("figures/cat.png", package="hexSticker")
sticker(imgurl, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=.6,
Expand All @@ -119,6 +127,7 @@ sticker(imgurl, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=.6,

### Google fonts


``` r
library(showtext)
## Loading Google fonts (http://www.google.com/fonts)
Expand All @@ -133,18 +142,18 @@ sticker(p, package="hexSticker", p_size=22, s_x=1, s_y=.75, s_width=1.3, s_heigh

<img src="inst/figures/ggplot2-google-font.png" height="300"/>

------------------------------------------------------------------------

----

## :sparkling_heart: Stickers produced by `hexSticker`

> If you use `hexSticker` and want your sticker to be listed here,
> please feel free to edit
> [README.Rmd](https://github.com/GuangchuangYu/hexSticker/edit/master/README.Rmd),
> and run `rmarkdown::render("README.Rmd")` in `R` to generate
> `README.md`.
> please feel free to edit [README.Rmd](https://github.com/GuangchuangYu/hexSticker/edit/master/README.Rmd),
> and run `rmarkdown::render("README.Rmd")` in `R` to generate `README.md`.

**Please put stickers in alphabet order.**


### Stickers for software packages

<!--
Expand Down Expand Up @@ -210,9 +219,10 @@ sticker(p, package="hexSticker", p_size=22, s_x=1, s_y=.75, s_width=1.3, s_heigh
[<img src="https://github.com/keblu/MSGARCH/raw/master/hexmsgarch_small.png" height="120"/>](https://github.com/keblu/MSGARCH)
[<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/MSnbase/MSnbase.png" height="120"/>](https://github.com/Bioconductor/BiocStickers/tree/master/MSnbase)
[<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/mzR/mzR_hl.png" height="120"/>](https://github.com/Bioconductor/BiocStickers/tree/master/mzR)
[<img src="https://github.com/nvietto/nopunintended/blob/master/man/logo.png" height="120"/>](https://github.com/nvietto/nopunintended)
[<img src="https://raw.githubusercontent.com/lbenz730/ncaahoopR/master/figures/logo.png" height="120"/>](https://github.com/lbenz730/ncaahoopR)
[<img src="https://shanmdphd.github.io/hex/ncarbe.png" height="120"/>](https://github.com/asancpt/ncarbe)
[<img src="https://user-images.githubusercontent.com/20061736/81393545-d662c680-9120-11ea-9963-a737f963bd8d.png" height="120"/>](https://mirkosignorelli.github.io/)
[<img src="https://user-images.githubusercontent.com/20061736/81393545-d662c680-9120-11ea-9963-a737f963bd8d.png" height="120"/>](https://mirkosignorelli.github.io/r.html)
[<img src="https://raw.githubusercontent.com/stevecondylios/netstat/master/man/figures/netstat.png" height="120"/>](https://github.com/stevecondylios/netstat)
[<img src="https://shanmdphd.github.io/hex/NonCompart.png" height="120"/>](https://github.com/asancpt/NonCompart)
[<img src="https://raw.githubusercontent.com/covid19br/nowcaster/main/man/figures/nowcaster_rev.png" height="120"/>](https://github.com/covid19br/nowcaster)
Expand All @@ -223,13 +233,14 @@ sticker(p, package="hexSticker", p_size=22, s_x=1, s_y=.75, s_width=1.3, s_heigh
[<img src="https://raw.githubusercontent.com/RGLab/openCyto/master/logo_mid.png" height="120"/>](http://github.com/RGLab/openCyto)
[<img src="https://github.com/DARTH-git/OpenTree/blob/main/openLogo.png" height="120"/>](https://github.com/DARTH-git/OpenTree)
[<img src="https://github.com/cosimameyer/overviewR/blob/master/man/figures/logo.png" height="120"/>](https://github.com/cosimameyer/overviewR)
[<img src="https://user-images.githubusercontent.com/20061736/162180793-072613f0-a93e-4ef6-b0c4-b8d8a45d770a.png" height="120"/>](https://mirkosignorelli.github.io/r.html)
[<img src="https://raw.githubusercontent.com/cbg-ethz/perturbatr/122cdd1516aa13d967677050dbf4fe08cfe66c7c/inst/figure/sticker.png" height="120"/>](https://github.com/cbg-ethz/perturbatr)
[<img src="https://raw.githubusercontent.com/uptake/pkgnet/master/man/figures/logo.png" height="120"/>](https://uptake.github.io/pkgnet/)
[<img src="https://raw.githubusercontent.com/dmi3kno/polite/master/data-raw/sticker.png" height="120"/>](https://github.com/dmi3kno/polite)
[<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/pRoloc/pRoloc.png" height="120"/>](https://github.com/Bioconductor/BiocStickers/tree/master/pRoloc)
[<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/pRoloc/pRolocdata.png" height="120"/>](https://github.com/Bioconductor/BiocStickers/tree/master/pRoloc)
[<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/pRoloc/pRolocGUI.png" height="120"/>](https://github.com/Bioconductor/BiocStickers/tree/master/pRoloc)
[<img src="https://user-images.githubusercontent.com/20061736/84284787-f3821f00-ab3c-11ea-85a7-220982ce518c.png" height="120"/>](https://mirkosignorelli.wixsite.com/home/software)
[<img src="https://user-images.githubusercontent.com/20061736/84284787-f3821f00-ab3c-11ea-85a7-220982ce518c.png" height="120"/>](https://mirkosignorelli.github.io/r.html)
[<img src="https://github.com/Yue-Jiang/pzfx/raw/master/man/figures/logo.png" height="120"/>](https://github.com/Yue-Jiang/pzfx)
[<img src="https://raw.githubusercontent.com/justinmillar/r-gators-hex/master/r-gators.png" height="120"/>](https://github.com/justinmillar/r-gators-hex)
[<img src="https://raw.githubusercontent.com/jorvlan/open-visualizations/master/R/package_figures/rainclouds_highres.png" height="120"/>](https://github.com/jorvlan/raincloudplots)
Expand Down Expand Up @@ -266,6 +277,7 @@ sticker(p, package="hexSticker", p_size=22, s_x=1, s_y=.75, s_width=1.3, s_heigh
[<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/xcms/xcms_hl.png" height="120"/>](https://github.com/Bioconductor/BiocStickers/tree/master/xcms)
[<img src="https://raw.githubusercontent.com/drisso/zinb_analysis/master/sticker/zinbwave.png" height="120"/>](https://github.com/drisso/zinb_analysis/tree/master/sticker)


### Stickers for events/workshops

[<img src="https://github.com/MonkmanMH/UVic_BIDA302/blob/main/hex_sticker/BIDA302_hex.png" height="120"/>](https://github.com/MonkmanMH/UVic_BIDA302)
Expand All @@ -287,18 +299,14 @@ sticker(p, package="hexSticker", p_size=22, s_x=1, s_y=.75, s_width=1.3, s_heigh
[<img src="https://user-images.githubusercontent.com/9893806/36942615-8f9b0640-1f2b-11e8-85eb-6d2cabcfd62f.png" height="120"/>](https://github.com/shinycrypto)
[<img src="https://github.com/slc-rug/slcrug-hexsticker/raw/master/R/slcrug_hex.png" height="120"/>](https://github.com/slc-rug/slcrug-hexsticker)


## Print/order stickers

Sticker designers can make their stickers available via [Sticker
Mule](https://www.stickermule.com/uses/hexagon-stickers).
Sticker designers can make their stickers available via [Sticker Mule](https://www.stickermule.com/uses/hexagon-stickers).

## Related Tools

- [badger](https://github.com/GuangchuangYu/badger): Query information
and generate badge for using in README and GitHub Pages.
- [ggimage](https://github.com/GuangchuangYu/ggimage): Supports image
files and graphic objects to be visualized in ‘ggplot2’ graphic
system.
- [meme](https://github.com/GuangchuangYu/meme/): Create Meme.
- [shadowtext](https://github.com/GuangchuangYu/shadowtext/): Create
text grob with background shadow.
+ [badger](https://github.com/GuangchuangYu/badger): Query information and generate badge for using in README and GitHub Pages.
+ [ggimage](https://github.com/GuangchuangYu/ggimage): Supports image files and graphic objects to be visualized in 'ggplot2' graphic system.
+ [meme](https://github.com/GuangchuangYu/meme/): Create Meme.
+ [shadowtext](https://github.com/GuangchuangYu/shadowtext/): Create text grob with background shadow.