plot_rgb_plane {pixelclasser}R Documentation

Plots a triangular plot to be filled with pixels and rules

Description

Plots the plane of the two variables selected by the user, one of (r, g or b), and lines identifying the triangular area that can contain pixels. representing the pixels of a transformed image and lines representing the rules can be later added to the plot using functions plot_pixels() and plot_rule().

Usage

plot_rgb_plane(
  x_axis,
  y_axis,
  plot_limits = TRUE,
  plot_guides = TRUE,
  plot_grid = TRUE,
  ...
)

Arguments

x_axis

a character string indicating which colour variable use as x, one of "r", "g" or "b",

y_axis

a character string indicating which colour variable use as y.

plot_limits

a logical value. When TRUE (default) the limits of the area where the pixels can be found are plotted.

plot_guides

a logical value. When TRUE (default) the limits of the area where one variable dominates are plotted.

plot_grid

a logical value; if TRUE (default) a grid is added.

...

additional graphical parameters passed to the underlying plotting functions.

Details

Because the variables were transformed into proportions, the pixels are always inside the triangle defined by the points (0, 0), (1, 0), (0, 1). This triangle is plotted in blue. The point where all three variables have the same value is (1/3, 1/3). The (red) lines joining this point with the centres of the triangle sides divide the plot in areas where one of the three variables has higher proportions than the other two. Also, a standard grid can be added. All these lines are visual aids, so, if desired, they can be eliminated using the parameters of the function.

Additional graphical parameters can be passed to the underlying graphical function to modify the appearance of the plot. Intended for passing xlim and ylim values to plot only the part of the graph where the points are concentrated.

Value

The function does not return any value.

See Also

plot_pixels, plot_rule, pixel_rule

Examples

# Simplest call
plot_rgb_plane("g", "b")

# Plane without the red lines
plot_rgb_plane("g", "b", plot_guides = FALSE)

# Restricting the plane area showed in the graph
plot_rgb_plane("g", "b", xlim = c(0.2, 0.5), ylim = c(0.0, 0.33))


[Package pixelclasser version 1.1.1 Index]