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.

# S3 method for 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.

Value

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

Details

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

Author

Victor Freguglia

Examples

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,")")))