plot_rule: Plots the line that defines a rule

Description Usage Arguments Details Value See Also Examples

View source: R/plot_rule.R

Description

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

Usage

1
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.

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().

Value

The function does not return any value.

See Also

plot_rgb_plane, define_rule, label_rule col2rgb

Examples

1
2
3
4
5
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")

ropensci/pixelclasser documentation built on Feb. 25, 2021, 2:08 p.m.