ReferenceregionBetweenCurves

<regionBetweenCurves>

A region bounded between two curves

<regionBetweenCurves> is a Graphical component that renders a shaded region on a graph between two specified curves.

Attributes and Properties

Attributes for <regionBetweenCurves>

Labels (1)
labelIsName

boolean. Default value: false. Whether to use this component's name as its rendered label.

Other (4)
applyStyleToLabel

boolean. Default value: false. Whether to apply this component's selected style to its label.

numberList. Default value: [0,1]. Boundary values defining the region's edges.

boolean. Default value: false. Whether to swap the role of x and y for the input functions.

layer

integer. Default value: 0. Z-order layer index used to stack graphical components (higher values render on top).

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <regionBetweenCurves name="r">

Labels (2)
$r.label

label. The label rendered with this component.

$r.labelIsName

boolean. Whether to use this component's name as its rendered label.

Other (10)
$r.applyStyleToLabel

boolean. Whether to apply this component's selected style to its label.

$r.boundaryValues

numberList. Boundary values defining the region's edges.

$r.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$r.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$r.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$r.flipFunctions

boolean. Whether to swap the role of x and y for the input functions.

$r.hidden

boolean. Whether this component is hidden from the rendered output.

$r.layer

integer. Z-order layer index used to stack graphical components (higher values render on top).

text. A textual description of the region's style.

text. Style description including the word "region".

Common to all components (4)
$r.doenetML

text. The DoenetML source code that produced this component.

$r.hide

boolean. Whether to hide this component from the rendered output.

$r.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$r.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: Render shading between two functions

The <regionBetweenCurves> component shades in the region between two functions ff and gg over a specified interval.

Attribute Examples

Attribute Example: flipFunctions

The flipFunctions attribute reflects the functions considered for the shading of the region about the line y=xy=x. The original functions remain unchanged.

Note: In order to render the reference function as “flipped”, you must use the <curve> component with the flipFunction attribute, as shown in the second graph.


Attribute Example: boundaryValues

The boundaryValues attribute accepts a list of xx-values or numerical references that define the endpoints of the shaded interval.


Attribute Example: styleNumber

The <regionBetweenCurves> component accepts the styleNumber attribute. Default styleNumbers range from 11 to 66.

Property Examples

Property Example: styleDescription/ styleDescriptionWithNoun

Since users can override styles and so may see different colors and line styles, don’t directly refer to the colors and line styles you create. Instead, use the properties styleDescription and styleDescriptionWithNoun. With those properties, the text will change to match the displayed styles.