View source: R/plot_lines_3d.R
plot_lines_3d | R Documentation |
Function plots a collection of line segments where segments
is a numeric matrix of six
columns of start and end points in 3d space. Options are provided for sizing the device window,
width/color of the segments, and defining/labeling axis,
plot_lines_3d( segments, win_width = 1000, win_height = 800, segment_colors = NULL, segment_widths = NULL, bkg_color = "white", draw_axis = TRUE, main_title = NULL, x_lab = "X", y_lab = "Y", z_lab = "Z", axis_color = "black", xlim = c(0, 10), ylim = c(0, 10), zlim = c(0, 10), x_ticks = 11, y_ticks = 11, z_ticks = 11, html_file = NULL )
segments |
A numeric matrix where each row is a line segment defined by a pair of points in 3d space. The first three columns defines the x/y/z coordinates for the first point; the next three columns define the second point of the segment. |
win_width, win_height |
An integer defining the dimensions of the plot window. |
segment_colors |
A vector of strings defining each segment's color. The default is "black".
The length of |
segment_widths |
A numeric vector defining each segment's width. The default is 1.0.
The length of |
bkg_color |
A character string defining the window background color. |
draw_axis |
A logical which if TRUE draws the axes. |
main_title |
A character string defining the plot's main title. |
x_lab, y_lab, z_lab |
A character string defining the axis labels. |
axis_color |
A character string defining the axis color. |
xlim, ylim, zlim |
An integer vector defining the min/max of an axis. |
x_ticks, y_ticks, z_ticks |
An integer defining the number of ticks for an axis. |
html_file |
A character string that defines the file path for creating a WebGL version of the plot. File names should have an html extension. |
The device window id (an integer).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.