knitr::opts_chunk$set(collapse = TRUE, comment = "#>") options(knitr.table.format = "html", rmarkdown.html_vignette.check_title = FALSE) library(eRTG3D) library(ggplot2) set.seed(1234) cerwList <- reproduce.track.3d(n.sim = 5, niclas, DEM = dem) # <img src="figs/plot3d.png" alt="Drawing" style="width: 96.5%;"/>
The trajectories can be plotted either in 2-D or in 3-D, using the ggplot2
and plotly
libraries. Additionally the densities of the track properties can be visualized.
cerwList <- reproduce.track.3d(n.sim = 5, niclas, DEM = dem)
The plot2d()
function takes either one or two arguments. The second argument can be a single track data.frame or list of track data.frames as for example the output of n.sim.cons.3d()
. Also a DEM rasterLayer can be passed to the function.
plot2d(niclas, cerwList, DEM=dem, titleText=paste("Steps: ", nrow(niclas), ", Niclas", sep=""))
#p <- plot3d(crws) #htmltools::tags$img(p, timesHeight=1)
The plot3d()
function takes either one or two arguments. The second argument can be a single track data.frame or list of track data.frames as for example the output of n.sim.cons.3d()
. Also a DEM rasterLayer, which is plotted as a surface can be passed to the function.
plot3d(niclas, cerwList, DEM=dem, titleText=paste("Steps: ", nrow(niclas), ", Niclas", sep=""))
The function takes either one or two tracks. The second track can be a list of tracks as for example the output of n.sim.cons.3d()
. In this case the densities of turn angle, lift angle and step length of all the simulations is taken. Additionally the autodifferences
parameter can be set to TRUE
, then the densities of the auto differences in turn angle, lift angle and step length are visualized.
plot3d.densities(niclas, cerwList)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.