plot regions defined by inequalities - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Packages : plots : plots/inequal

plots[inequal] - plot regions defined by inequalities

Calling Sequence

inequal(ineqs, xspec, yspec, options)

Parameters

ineqs

-

one inequality, a set or list of inequalities, a nested list or set of inequalities, or a boolean combination of inequalities

xspec

-

xvar=min_x..max_x

yspec

-

yvar=min_y..max_y

options

-

(optional) plot options, including optionsfeasible, optionsexcluded, optionsopen, optionsclosed, backwardscompatible, nolines, or additional plot options. See the Description for details.

Description

• 

Plot regions defined by inequalities in two unknown variables. If a list or set of inequalities is given, the intersection of their feasible regions is plotted.  If a list of list or set of sets of inequalities is given, then the union of each of the feasible regions is plotted. For convenience, combinations of inequalities may instead be specified using boolean operators that will then be converted into the list of lists format by conversion to disjunctive normal form.

• 

The plot comprises four elements:

feasible region

for the regions that satisfy all inequalities

excluded regions

for the regions that violate at least one inequality

open lines

representing the borders of a strict inequality

closed lines

representing the borders of an inequality that

 

includes its edges, and also the equalities

• 

The styles of each of these types of elements can be controlled independently. Each option is of the form optionname = [sequence of plot options]. The optionnames are optionsfeasible, optionsexcluded, optionsopen, and optionsclosed.  Only options applicable to curves and polygons, which are used to represent these elements, are accepted.  The option axeslabels, for example, cannot be used with one of the four option names listed above, but can be provided separately as an additional plotting option.  For more information, see the plot/options help page.

• 

If ineqs is a list of lists, then any of the options except optionsexcluded can be given as a list of lists of options to specify the style of each of the regions separately.

• 

If a style is specified for optionsexcluded then a rectangle will be drawn behind the feasible region. Note: To create plots that can be combined with plots[display], avoid using the optionsexcluded option.

• 

Additional plotting options (those not passed in one of the four option lists) will be applied to the feasible regions when applicable.

• 

The algorithm used by inequal changed significantly in Maple 17. For applications that rely on the old behavior, you can use the backwardcompatible option to get the old algorithm from Maple 16 and earlier.

• 

The nonlinear components of the inequalities will be rendered by plots[implicitplot] using a heuristic to compromise between visual fidelity and computation speed. The option optionsimplicit can be used to explicitly pass a list of options to implicitplot to achieve faster performance or a smoother plot.

• 

To create a plot displaying only the feasible region areas without borders, specify the option nolines.

Examples

withplots:

inequal0<x&plus;y&comma;x&equals;3..3&comma;y&equals;3..3

inequal0<x&plus;y&comma;xy1&comma;x&equals;3..3&comma;y&equals;3..3&comma;color&equals;Nautical 1

inequal0<x&plus;y&comma;xy1&comma;x&equals;3..3&comma;y&equals;3..3&comma;optionsexcluded&equals;color&equals;Niagara DarkOrchid

inequal3<a&plus;b&comma;2ba<6&comma;5<3a&plus;2b&comma;b&plus;a8&comma;0<3a&plus;2b&comma;a&equals;10..30&comma;b&equals;10..15

The nolines option can give a cleaner looking plot.

inequal3<a&plus;b&comma;2ba<6&comma;5<3a&plus;2b&comma;b&plus;a8&comma;0<3a&plus;2b&comma;a&equals;10..30&comma;b&equals;10..15&comma;&apos;nolines&apos;

Specifying a nested set of sets is like combining multiple inequal plots using plots[display] except that optionsexcluded can be used.

inequal0x&plus;y2&comma;y<32&comma;32<y&comma;x<2&comma;32<y&comma;x<2&comma;y<32&comma;x&equals;3..3&comma;y&equals;3..3&comma;optionsexcluded&equals;color&equals;Niagara DarkOrchid

displayinequal0x&plus;y2&comma;y<32&comma;32<y&comma;x&equals;3..3&comma;y&equals;3..3&comma;inequalx<2&comma;32<y&comma;x&equals;3..3&comma;y&equals;3..3&comma;inequalx<2&comma;y<32&comma;x&equals;3..3&comma;y&equals;3..3

This is the command to create the plot from the Plotting Guide.

inequal0<x&plus;y&comma;xy1&comma;y&equals;2&comma;x&equals;3..3&comma;y&equals;3..3&comma;optionsfeasible&equals;color&equals;DarkGrey&comma;optionsopen&equals;color&equals;Navy&comma;thickness&equals;2&comma;optionsclosed&equals;color&equals;Niagara Green&comma;thickness&equals;3&comma;optionsexcluded&equals;color&equals;WhiteSmoke

Using a list of lists input, different colors can be specified for the regions:

inequal3b&comma;a<2b&plus;8&comma;2b6<a&comma;53<b&comma;b<3&comma;a<2b&plus;8&comma;b&plus;3<a&comma;a&equals;2..15&comma;b&equals;4..11&comma;optionsfeasible&equals;color&equals;Spring 1&comma;color&equals;Spring 2

Boolean operators can be used instead of the list of lists input; however, the order of regions may changed by in preprocessing so styles may have to be adjusted.

inequal3banda<2b&plus;8and2b6<aor53<bandb<3anda<2b&plus;8andb&plus;3<a&comma;a&equals;2..15&comma;b&equals;4..11&comma;optionsfeasible&equals;color&equals;Spring 1&comma;color&equals;Spring 2

See Also

plot/options, plots, plots[implicitplot]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam