plot.mrfi: Plotting of 'mrfi' objects.

Description Usage Arguments Details Value Author(s) Examples

View source: R/mrfi_methods.R

Description

Plots a visual representation of the interaction structure described in a mrfi object. The black tile represents a reference pixel and gray tiles are shown in relative positions with dependent pixels.

A ggplot object is used, therefore, the user can load the ggplot2 package and add more ggplot layers to freely customize the plot.

Usage

1
2
## S3 method for class 'mrfi'
plot(x, include_axis = FALSE, include_opposite = TRUE, ...)

Arguments

x

A mrfi object.

include_axis

logical indicating whether the axis and grid lines are included. If FALSE theme_void() is added to the ggplot object.

include_opposite

┬┤logical' whether opposite directions should be included in the visualization of the dependence structure.

...

other arguments not used by this method.

Details

The data.frame used for the ggplot call has columns names rx and ry rep┼Ľesenting the relative positions.

Value

A ggplot object using geom_tile() to represent interacting relative positions.

Author(s)

Victor Freguglia

Examples

1
2
3
4
5
6
7
plot(mrfi(1))

library(ggplot2)
plot(mrfi(1)) + geom_tile(fill = "red")
plot(mrfi(1)) + geom_tile(fill = "blue") + theme_void()

plot(mrfi(1)) + geom_text(aes(label = paste0("(",rx,",",ry,")")))

mrf2d documentation built on Oct. 30, 2020, 1:07 a.m.