Learn R Programming

x3ptools (version 0.0.2)

image_x3p: Plot x3p object as an image

Description

Plot x3p object as an image

Usage

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

...

not used

Examples

Run this code
# NOT RUN {
logo <- read_x3p(system.file("csafe-logo.x3p", package="x3ptools"))
image_x3p(logo, file = "logo.png", crosscut = 50*.645e-6)
# alternative to crosscut
logoplus <- x3p_add_hline(logo, yintercept = 50*.645e-6, color = "#e6bf98", size = 5)
image_x3p(logoplus, size = c(741, 419), zoom=0.5)
# }

Run the code above in your browser using DataLab