Learn R Programming

gridOT (version 1.0.2)

plot.otgrid: Plots for two-dimensional Optimal Transport

Description

Plot two-dimensional grids or visualize the pivot measure.

Usage

# S3 method for otgrid
plot(x, num.col = 256, useRaster = TRUE, ...)

# S3 method for otgridtransport plot(x, num.col = 256, useRaster = TRUE, back.col = "lightblue", ...)

Value

No return value, called for side effects.

Arguments

x

an object of class "otgrid" or "otgridtransport"

num.col

number of colors (grey) to use.

useRaster

parameter passed to the image function.

...

further arguments (currently unused).

back.col

color of the background.

Details

For objects of class "otgrid", the grid is plotted as a greyscale image.

For objects of class "otgridtransport", the pivot measure is visualized as follows: the two grids of the transport are plotted in the left upper (from) and right lower (to) corner. The pivot measure is in the left lower corner such that the marginals match.

See Also

pivot measure pivot_measure, grid otgrid