https://github.com/Jiawang1209/ggSketch
ggSketch is an R package that transforms photos into sketch-style contour drawings using the grammar of ggplot2.
https://github.com/Jiawang1209/ggSketch
Last synced: 5 months ago
JSON representation
ggSketch is an R package that transforms photos into sketch-style contour drawings using the grammar of ggplot2.
- Host: GitHub
- URL: https://github.com/Jiawang1209/ggSketch
- Owner: Jiawang1209
- License: other
- Created: 2025-11-22T14:57:58.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-22T15:19:19.000Z (8 months ago)
- Last Synced: 2025-11-22T17:20:52.716Z (8 months ago)
- Language: R
- Size: 3.39 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- awesome-ggplot2 - ggSketch - style contour drawings (Miscellaneous)
README
---
title: "ggSketch"
author: "Jiawang Liu"
date: "2025-11-22"
output: github_document
---
# Install
```
# install.packages("devtools")
devtools::install_github("Jiawang1209/ggSketch")
```
or
```
# install.packages("pak")
pak::pak("Jiawang1209/ggSketch")
```
# Load R Package
```{r}
library(ggSketch)
library(ggplot2)
library(dplyr)
library(patchwork)
```
# Example Data
```{r}
img1 <- system.file("extdata", "Kobe.png", package = "ggSketch")
p1 <- ggSketch(photopath = img1,
color = "#000000",
linewidth = 0.3)
p1
```
```{r}
img2 <- system.file("extdata", "LeBron.png", package = "ggSketch")
p2 <- ggSketch(photopath = img2,
color = "#000000",
linewidth = 0.3)
p2
```
```{r}
img3 <- system.file("extdata", "Kobe_LeBron.png", package = "ggSketch")
p3 <- ggSketch(photopath = img3,
color = "#000000",
linewidth = 0.3)
p3
```
```{r}
p_combine <- (p1 + p2) / p3
p_combine
```
# sessionInfo
```{r}
sessionInfo()
```