plot_rule {pixelclasser}R Documentation

Plots the line that defines a rule

Description

This function draws the line that defines a rule on the plot created by plot_rgb_plane().

Usage

plot_rule(rule, label = "", ...)

Arguments

rule

an object of class "pixel_rule" produced by pixel_rule().

label

a string to label the line. It is attached at the coordinates of the second point used to define the line.

...

additional graphical parameters passed to the underlying graphic functions, for example to define the line colour or dashing style.

Details

The function uses the information stored in the "pixel_rule" object to plot the line.

Use the ... to set the colour and other characteristics of the line. For colours use any character string understood by col2rgb().

A label can be added to the line using label_rule().

Value

The function does not return any value.

See Also

plot_rgb_plane, pixel_rule, label_rule col2rgb

Examples

rule_01 <- pixel_rule("rule_01", "g", "b",
                      list(c(0.345, 1/3), c(0.40, 0.10)), "<")

plot_rgb_plane("g", "b")
plot_rule(rule_01, col = "green")


[Package pixelclasser version 1.1.1 Index]