Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot-methods

Plot a Fuzzy Number


Description

The function aims to provide a similar look-and-feel to the built-in plot.default and curve function.

Usage

## S4 method for signature 'FuzzyNumber,missing'
plot(x, y, from=NULL, to=NULL, n=101, at.alpha=NULL,
draw.membership.function=TRUE, draw.alphacuts=!draw.membership.function,
xlab=NULL, ylab=NULL, xlim=NULL, ylim=NULL,
type="l", col=1, lty=1, pch=1, lwd=1,
shadowdensity=15, shadowangle=45, shadowcol=col, shadowborder=NULL,
add=FALSE, ...)

## S4 method for signature 'TrapezoidalFuzzyNumber,missing'
plot(x, y, from=NULL, to=NULL,
draw.membership.function=TRUE, draw.alphacuts=!draw.membership.function,
xlab=NULL, ylab=NULL, xlim=NULL, ylim=NULL,
type="l", col=1, lty=1, pch=1, lwd=1, add=FALSE, ...)

## S4 method for signature 'PiecewiseLinearFuzzyNumber,missing'
plot(x, y, from=NULL, to=NULL,
draw.membership.function=TRUE, draw.alphacuts=!draw.membership.function,
xlab=NULL, ylab=NULL, xlim=NULL, ylim=NULL,
type="l", col=1, lty=1, pch=1, lwd=1, add=FALSE, ...)

## S4 method for signature 'DiscontinuousFuzzyNumber,missing'
plot(x, y, from=NULL, to=NULL,
n=101, draw.membership.function=TRUE, draw.alphacuts=!draw.membership.function,
xlab=NULL, ylab=NULL, xlim=NULL, ylim=NULL,
type="l", col=1, lty=1, pch=1, lwd=1,
add=FALSE, ...)

Arguments

x

a fuzzy number

y

not used

from

numeric;

to

numeric;

n

numeric; number of points to probe

at.alpha

numeric vector; give exact alpha-cuts at which linear interpolation should be done

draw.membership.function

logical; you want membership function (TRUE) or alpha-cuts plot (FALSE)?

draw.alphacuts

logical; defaults !draw.membership.function

xlab

character; x-axis label

ylab

character; y-axis label

xlim

numeric;

ylim

numeric;

type

character; defaults "l"; plot type, e.g.~"l" for lines, "p" for points, or "b" for both

col

see plot.default

lty

see plot.default

pch

see plot.default

lwd

see plot.default

shadowdensity

numeric; for shadowed sets;

shadowangle

numeric; for shadowed sets;

shadowcol

color specification, see plot.default; for shadowed sets;

shadowborder

numeric; for shadowed sets;

add

logical; add another FuzzyNumber to existing plot?

...

further arguments passed to plot.default

Details

Note that if from > a1 then it is set to a1.

Value

Returns nothing really interesting.

See Also

Examples

plot(FuzzyNumber(0,1,2,3), col="gray")
plot(FuzzyNumber(0,1,2,3, left=function(x) x^2, right=function(x) 1-x^3), add=TRUE)
plot(FuzzyNumber(0,1,2,3, lower=function(x) x, upper=function(x) 1-x), add=TRUE, col=2)

FuzzyNumbers

Tools to Deal with Fuzzy Numbers

v0.4-6
LGPL (>= 3)
Authors
Marek Gagolewski [aut, cre], Jan Caha [ctb]
Initial release
2019-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.