plot_twoway: To plot the mapping between the simulated and actual versions

Description Usage Arguments Details Examples

Description

This function is a wrapper around the dtwPlotTwoWay from the dtw package in R.

Usage

1
2
3
plot_twoway(mtc_sim_mapped, mtc_device_sim, mtc_device, offset = 100,
  total_maps = 50, mtc_map_string = "path_pos_x",
  sim_map_string = "x_pos")

Arguments

mtc_sim_mapped

is the mapping between simulated and actual data

mtc_device_sim

is the simulated data

mtc_device

is the actual log data

offset

is the amount by which the simulated data is shifted in the y axis

total_maps

is the number of mapping line segment between the two plots

mtc_map_string

is the name of the data item to match in the actual data

sim_map_string

is the name of the data item to match in the simulated data

Details

In our case, this function can be used to compare the variation of a single variable in the simulated and actual data. The simulated and actual data are represented on the same y axis with the time representing the x axis. An offset is provided to the simulated data to easily disinguish the two. Data points that are mapped to each other are connected by a line segment between the two fraphs

Examples

1
2
3
4
5
data("example_mtc_device_3")   # MTCDevice object of actual log data
data("example_mtc_device_sim") # Simulated gcode 
data("example_mtc_sim_mapped") # Mapping between simulated and actual data
mapping_ggplot = plot_twoway(example_mtc_sim_mapped, example_mtc_device_sim, 
example_mtc_device_3,offset = 20, total_maps = 100)

mtconnectR documentation built on May 1, 2019, 10:38 p.m.