Learn R Programming

x3ptools (version 0.0.3)

x3p_image: Plot x3p object as an image

Description

Plot x3p object as an image

Usage

x3p_image(
  x3p,
  file = NULL,
  col = "#cd7f32",
  crosscut = NA,
  ccParam = list(color = "#e6bf98", radius = 5),
  size = c(750, 250),
  zoom = 0.35,
  multiply = 5,
  update = FALSE,
  ...
)

image_x3p( x3p, file = NULL, col = "#cd7f32", crosscut = NA, ccParam = list(color = "#e6bf98", radius = 5), size = c(750, 250), zoom = 0.35, multiply = 5, ... )

Arguments

x3p

x3p object

file

file name for saving, if file is NULL the opengl device stays open. The file extension determines the type of output. Possible extensions are png, stl (suitable for 3d printing), or svg.

col

color specification

crosscut

crosscut index

ccParam

list with named components, consisting of parameters for showing crosscuts: color and radius for crosscut region

size

vector of width and height

zoom

numeric value indicating the amount of zoom

multiply

exaggerate the relief by factor multiply

update

Boolean value indicating whether a scene should be updated (defaults to FALSE). If FALSE, a new rgl device is opened.

...

not used

Examples

Run this code
if (FALSE) {
logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
x3p_image(logoplus, size = c(741, 419), zoom=0.5)
# add crosscut:
logoplus <- x3p_add_hline(logo, yintercept = 50*.645e-6, color = "#e6bf98", size = 5)
x3p_image(logoplus, size = c(741, 419), zoom=0.5)
}

Run the code above in your browser using DataLab