FuzzyNumbers (version 0.4-6)

plot: 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 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 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 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 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

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

Value

Returns nothing really interesting.

Details

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

See Also

Other FuzzyNumber-method: Arithmetic, FuzzyNumber-class, FuzzyNumber, alphaInterval, alphacut, ambiguity, as.FuzzyNumber, as.PiecewiseLinearFuzzyNumber, as.PowerFuzzyNumber, as.TrapezoidalFuzzyNumber, as.character, core, distance, evaluate, expectedInterval, expectedValue, integrateAlpha, piecewiseLinearApproximation, show, supp, trapezoidalApproximation, value, weightedExpectedValue, width

Other PiecewiseLinearFuzzyNumber-method: Arithmetic, PiecewiseLinearFuzzyNumber-class, PiecewiseLinearFuzzyNumber, ^,PiecewiseLinearFuzzyNumber,numeric-method, alphaInterval, arctan2, as.PiecewiseLinearFuzzyNumber, as.PowerFuzzyNumber, as.TrapezoidalFuzzyNumber, as.character, expectedInterval, fapply, maximum, minimum, necessityExceedance, necessityStrictExceedance, necessityStrictUndervaluation, necessityUndervaluation, possibilityExceedance, possibilityStrictExceedance, possibilityStrictUndervaluation, possibilityUndervaluation

Other TrapezoidalFuzzyNumber-method: Arithmetic, TrapezoidalFuzzyNumber-class, TrapezoidalFuzzyNumber, TriangularFuzzyNumber, alphaInterval, as.PiecewiseLinearFuzzyNumber, as.PowerFuzzyNumber, as.TrapezoidalFuzzyNumber, expectedInterval

Other DiscontinuousFuzzyNumber-method: DiscontinuousFuzzyNumber-class, DiscontinuousFuzzyNumber, distance, integrateAlpha

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataCamp Workspace