Skip to contents

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 define_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 lines() function, for example to define the line colour or dashing style. They are also used for the line label.

Value

The function does not return any value.

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. Use any character string understood by col2rgb().

Labels can be added to the rule using label_rule().

Examples

rule_01 <- define_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")