Skip to contents

stat_path_3d() converts path data (connected points) into segment data for proper 3D depth sorting. Each consecutive pair of points in a path becomes a separate segment that can be depth-sorted independently.

Usage

stat_path_3d(
  mapping = NULL,
  data = NULL,
  geom = GeomSegment3D,
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Arguments

mapping

Set of aesthetic mappings created by aes().

data

The data to be displayed in this layer.

geom

The geometric object to use display the data. Defaults to GeomSegment3D.

position

Position adjustment, defaults to "identity".

na.rm

If FALSE, missing values are removed with a warning.

show.legend

Logical indicating whether this layer should be included in legends.

inherit.aes

If FALSE, overrides the default aesthetics.

...

Other arguments passed on to layer().

Computed variables

  • x, y, z: Start coordinates of each segment

  • xend, yend, zend: End coordinates of each segment

  • group: Hierarchical group identifier preserving original grouping