lcd: Liquid Crystal Diagram (LCD) plot

Description Usage Arguments Examples

View source: R/lcd-plot.R

Description

lcd() is a wrapper for gglcd::geom_lc(). It produces simple LC alignmnet diagrams using ggplot2.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
lcd(
  angle_b = 0,
  angle_t = 90,
  angle_function = NULL,
  angle_n = 0,
  n_mol_x = 30,
  n_mol_y = 30,
  x_jitter = 0.4,
  y_jitter = 0.4,
  lc_length = 0.05,
  lc_width = 0.016,
  diagram_aspect = 1,
  seed = NULL,
  surface_b = NULL,
  surface_t = NULL,
  lc_shape = "rectangle",
  ellipse_res = 35,
  return_df = FALSE,
  themeing = TRUE,
  show_function = FALSE,
  lc_lwd = 0.2,
  surface_b_lwd = 0.2,
  surface_t_lwd = 0.2,
  bg_lwd = 0.2,
  lc_fill = "grey80",
  lc_col = "black",
  bg_fill = "white",
  bg_col = "black",
  surface_b_fill = "black",
  surface_b_col = NA,
  surface_t_fill = "black",
  surface_t_col = NA
)

Arguments

angle_b

Angle of molecules at bottom of plot (degrees, measured anti-clockwise from +ve x)

angle_t

Angle of molecules at top of plot (degrees, measured anti-clockwise from +ve x)

angle_function

A function that takes a value of the image height (from 0 to 1) and returns the angle of a molecule at that height

angle_n

Noise to be added to angles (a random angle from -angle_n:angle_n is added to each molecule)

n_mol_x

Number of molecules in x (default is 30)

n_mol_y

Number of molecules in y (default is 30)

x_jitter

Jitter to apply to molecule centres in x. Value is applied as a proportion of lc_length (default = 0.4)

y_jitter

Jitter to apply to molecule centres in y. Value is applied as a proportion of lc_length (default = 0.4)

lc_length

Length of LC molecule (vector of length 1 or (n_mol_x * n_mol_y))

lc_width

Width of LC molecule (vector of length 1 or (n_mol_x * n_mol_y))

diagram_aspect

Aspect ratio of diagram (length / width)

seed

Random seed for reproducability

surface_b

Height of bottom surface layer

surface_t

Height of top surface layer

lc_shape

One of "rectangle" (default) or "ellipse"

ellipse_res

Resolution of ellipse polygons

return_df

Should just the dataframe be returned (Default: FALSE)

themeing

Should themeing be applied (Default: TRUE)

show_function

Logical. Print functional form of angle_function over diagram

lc_lwd

Linewidth of LC molecules

surface_b_lwd

Linewidth of bottom surface

surface_t_lwd

Linewidth of top surface

bg_lwd

Linewidth of plot border

lc_fill

Fill colour for LC molecules

lc_col

Border colour for LC molecules

bg_fill

Fill colour for diagram background

bg_col

Line colour for diagram background

surface_b_fill

Fill colour of bottom surface

surface_b_col

Line colour of bottom surface

surface_t_fill

Fill colour of top surface

surface_t_col

Line colour of top surface

Examples

1
2
lcd(0, 360)
lcd(0, 360, return_df = TRUE)

cj-holmes/gglcd documentation built on July 30, 2020, 9:54 a.m.