gg3d_add_grid_lines | R Documentation |
Add grid lines to a ggplot perspective plot.
gg3d_add_grid_lines(
myplot,
x = seq(0, 1, 0.1),
y = c(0, 1),
z = 0,
proj_mat,
col = grey(0.8),
size = 0.5,
break_axis = NULL
)
myplot |
an object of class |
x, y, z |
coordinates of lines. Values must be a sequence of breaks or a pair of start-end values or a single value (see details). |
proj_mat |
4*4 projection matrix, as returned from
|
col |
line colour. |
size |
line size. |
break_axis |
which axis to apply breaks over. If |
The vectors x
, y
, and z
together define the
locations and orientations of the lines. One of these vectors must be a
series of breaks, one must be a limit (i.e. a vector of two values) and one
must be a single value. For example, if x = 1:5, y = c(-1,1), z = 3
then lines will be drawn parallel to the y-axis at x-values 1:5, spanning a
range -1 to 1, and in the z-plane at position z = 3. If there are only two
breaks then it becomes impossible to determine which axis represents breaks
and which represents limits, hence the argument break_axis
must be
specified (otherwise this is chosen automatically).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.