spiraplot: Create spiraplot images

Description Usage Arguments Value

View source: R/spiraplot.R

Description

Create spiraplot images

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
spiraplot(
  img,
  image_res = 300,
  ncols = 16,
  spiral_turns = 80,
  spiral_res = 10000,
  spiral_r0 = 0,
  spiral_r1_f = 1,
  thin = 0.05,
  thick = 1.5,
  contrast = 2,
  offset_angle = 0,
  aspect = "landscape",
  col_bg = "white",
  col_line = "black",
  show_image = FALSE
)

Arguments

img

Path of URL of image

image_res

Horizontal resolution for resized image

ncols

Number of shades of grey to quantise image into

spiral_turns

Number of turns in spiral

spiral_res

Number of points on spiral

spiral_r0

Spiral inner radius

spiral_r1_f

Multiplicative scaling factor for spiral outer radius (1 makes spiral to full image width or height)

thin

Size of thinnest lines in spiral

thick

Size of thickest lines in spiral

contrast

A measure of contrast. Higher numbers will give more contrast. A value of 1 will scale the line width linearly from the darkest to the lightest shade of grey (default = 2)

offset_angle

Offset angle of spiral in degrees (default = 0)

aspect

Image aspect "landscape" (default) or "portrait"

col_bg

Background colour

col_line

Spiral line colour

show_image

Show image underneath spiral (default FALSE)

Value

A ggplot2 plot


cj-holmes/spiraplot documentation built on Dec. 19, 2021, 4:59 p.m.