plot_track {QuAnTeTrack} | R Documentation |
Plot tracks and footprints
Description
plot_track()
visualizes track and footprint data in various ways, allowing for the plotting of trajectories, footprints, or both combined, with customizable aesthetics.
Usage
plot_track(
data,
plot = "FootprintsTracks",
colours = NULL,
cex.f = NULL,
shape.f = NULL,
alpha.f = NULL,
cex.t = NULL,
alpha.t = NULL,
plot.labels = NULL,
labels = NULL,
box.p = NULL,
cex.l = NULL,
alpha.l = NULL
)
Arguments
data |
A
|
plot |
Type of plot to generate. Options are |
colours |
A vector of colors to be used for different tracks. If |
cex.f |
The size of the footprint points. Default is |
shape.f |
A vector of shapes to be used for footprints in different tracks. If |
alpha.f |
The transparency of the footprint points. Default is |
cex.t |
The size of the track lines. Default is |
alpha.t |
The transparency of the track lines. Default is |
plot.labels |
Logical indicating whether to add labels to each track. Default is |
labels |
A vector of labels for each track. If |
box.p |
Padding around label boxes, used only if |
cex.l |
The size of the labels. Default is |
alpha.l |
The transparency of the labels. Default is |
Value
A ggplot
object that displays the specified plot type, including tracks, footprints, or both, from track
R objects. The ggplot2 package is used for plotting.
Logo
Author(s)
Humberto G. Ferrón
humberto.ferron@uv.es
Macroevolution and Functional Morphology Research Group (www.macrofun.es)
Cavanilles Institute of Biodiversity and Evolutionary Biology
Calle Catedrático José Beltrán Martínez, nº 2
46980 Paterna - Valencia - Spain
Phone: +34 (9635) 44477
See Also
Examples
# Example 1: Basic Plot with Default Settings - MountTom Dataset
plot_track(MountTom)
# Example 2: Basic Plot with Default Settings - PaluxyRiver Dataset
plot_track(PaluxyRiver)
# Example 3: Plot Tracks Only - MountTom Dataset
plot_track(MountTom, plot = "Tracks")
# Example 4: Plot Footprints Only - PaluxyRiver Dataset
plot_track(PaluxyRiver, plot = "Footprints")
# Example 5: Custom Colors for Tracks - MountTom Dataset
custom_colors <- c(
"#008000", "#0000FF", "#FF0000", "#800080", "#FFA500", "#FFC0CB", "#FFFF00",
"#00FFFF", "#A52A2A", "#FF00FF", "#808080", "#000000", "#006400", "#00008B",
"#8B0000", "#FF8C00", "#008B8B", "#A9A9A9", "#000080", "#808000", "#800000",
"#008080", "#FFD700"
)
plot_track(MountTom, colours = custom_colors)
# Example 6: Larger Footprints and Track Lines - PaluxyRiver Dataset
plot_track(PaluxyRiver, cex.f = 5, cex.t = 2)
# Example 7: Semi-Transparent Footprints and Tracks - MountTom Dataset
plot_track(MountTom, alpha.f = 0.5, alpha.t = 0.5)
# Example 8: Different Shapes for Footprints - PaluxyRiver Dataset
plot_track(PaluxyRiver, shape.f = c(16, 17))
# Example 9: Plot with Labels for Tracks - MountTom Dataset
labels <- paste("Track", seq_along(MountTom[[1]]))
plot_track(MountTom, plot.labels = TRUE, labels = labels, cex.l = 4, box.p = 0.3, alpha.l = 0.7)
# Example 10: Custom Colors and Shapes for Footprints Only - PaluxyRiver Dataset
plot_track(PaluxyRiver, plot = "Footprints", colours = c("purple", "orange"), shape.f = c(15, 18))
# Example 11: Larger Line Size & Custom Colors for Tracks Only - MountTom Dataset
plot_track(MountTom, plot = "Tracks", cex.t = 1.5, colours = custom_colors)
# Example 12: Black Footprints and Tracks with Labels - PaluxyRiver Dataset
plot_track(PaluxyRiver,
colours = NULL, shape.f = c(16, 16), plot.labels = TRUE,
labels = c("Saurpod", "Theropod"), cex.l = 2, alpha.l = 0.5
)