ReImPlot

ReImPlot[f,{x,xmin,xmax}]
generates a plot of Re[f] and Im[f] as functions of x∈ from xmin to xmax.
ReImPlot[{f1,f2,…},{x,xmin,xmax}]
plots several functions.
ReImPlot[{…,w[fi],…},…]
plots fi with features defined by the symbolic wrapper w.
ReImPlot[…,{x}∈reg]
takes the variable x to be in the geometric region reg.
Details and Options




- ReImPlot evaluates f at different values of x to create smooth curves of the form {x,Re[f[x]]} and {x,Im[f[x]]}.
- Gaps are left at any x where the fi evaluate to non-numeric values.
- The region reg can be any RegionQ object in 1D.
- ReImPlot treats the variable x as local, effectively using Block.
- ReImPlot has attribute HoldAll and evaluates f only after assigning specific numerical values to x.
- In some cases, it may be more efficient to use Evaluate to evaluate f symbolically before specific numerical values are assigned to x.
- Wrappers apply to both Re[f] and Im[f].
- The following wrappers w can be used for the fi:
-
Annotation[fi,label] provide an annotation for the fi Button[fi,action] evaluate action when the curve for fi is clicked Callout[fi,label] label the function with a callout Callout[fi,label,pos] place the callout at relative position pos EventHandler[fi,events] define a general event handler for fi Hyperlink[fi,uri] make the function a hyperlink Labeled[fi,label] label the function Labeled[fi,label,pos] place the label at relative position pos Legended[fi,label] identify the function in a legend PopupWindow[fi,cont] attach a popup window to the function StatusArea[fi,label] display in the status area on mouseover Style[fi,styles] show the function using the specified styles Tooltip[fi,label] attach a tooltip to the function Tooltip[fi] use functions as tooltips - Wrappers w can be applied at multiple levels:
-
w[fi] wrap the fi w[{f1,…}] wrap a collection of fi w1[w2[…]] use nested wrappers - Callout, Labeled and Placed can use the following positions pos:
-
Automatic automatically placed labels Above, Below, Before, After positions around the curve x near the curve at a position x Scaled[s] scaled position s along the curve {s,Above},{s,Below},… relative position at position s along the curve {pos,epos} epos in label placed at relative position pos of the curve - ReImPlot has the same options as Plot, with the following additions and changes:
-
ReImLabels Automatic how to annotate the real and imaginary components ReImStyle Automatic how to style the real and imaginary components - Possible settings for ClippingStyle are:
-
Automatic use a dotted line for the clipped portion None omit the clipped portion of the curve style use style for the clipped portion - With the default settings Exclusions->Automatic and ExclusionsStyle->None, Plot breaks curves at discontinuities and singularities it detects. Exclusions->None joins across discontinuities and singularities.
- Exclusions->{x1,x2,…} is equivalent to Exclusions->{x==x1,x==x2,…}.
- Possible settings for PlotLegends are:
-
None do not include legends "Expressions" use a legend for the fi "ReIm" use a legend for the real and imaginary styles "ReImExpressions" use separate legends for the plot, real and imaginary styles Automatic use a legend for all style combinations {lbl1,lbl2,…} use lbli to legend fi Placed[leg,pos] specify placement pos of legend leg {leg1,leg2,…} include multiple legends - ReImPlot initially evaluates f at a number of equally spaced sample points specified by PlotPoints. Then it uses an adaptive algorithm to choose additional sample points, subdividing a given interval at most MaxRecursion times.
- Since only a finite number of sample points are used, it is possible for ReImPlot to miss features of f. Increasing the settings for PlotPoints and MaxRecursion will often catch such features.
- Themes that affect curves include:
-
"ThinLines" thin plot lines "MediumLines" medium plot lines "ThickLines" thick plot lines - The arguments supplied to functions in MeshFunctions and RegionFunction are x, y. Functions in ColorFunction are by default supplied with scaled versions of these arguments.
- ScalingFunctions->"scale" scales the
coordinate; ScalingFunctions{"scalex","scaley"} scales both the
and
coordinates.


Examples
open allclose allBasic Examples (3)
Scope (20)
Sampling (9)
More points are sampled where the function changes quickly:
The plot range is selected automatically:
Use PlotRange to focus in on areas of interest:
The curve is split when there are discontinuities in the function:
Use ExclusionsNone to draw connected curves:
Use PlotPoints and MaxRecursion to control adaptive sampling:
The domain can be specified by a region:
Specify a domain using a MeshRegion:
Labeling and Legending (5)
Presentation (6)
Multiple pairs of curves are automatically colored to be distinct:
Provide explicit styling to different curves:
Use ScalingFunctions to scale the axes:
Options (57)
ColorFunction (4)
Color by a scaled coordinate and scaled
coordinate, respectively:
ColorFunction has higher priority than PlotStyle:
Exclusions (2)
ExclusionStyle (1)
Filling (4)
FillingStyle (3)
Fill with red below the axis and blue above:
Use a variable filling style obtained from a ColorFunction:
MaxRecursion (1)
Each level of MaxRecursion adaptively subdivides the initial mesh into a finer mesh:
Mesh (3)
MeshFunctions (2)
MeshShading (3)
Alternate red and blue arcs in the direction:
MeshShading has higher priority than PlotStyle for styling:
Use PlotStyle for some segments by setting MeshShading to Automatic:
MeshStyle (2)
PerformanceGoal (2)
PlotLabels (6)
Modify the appearance of the labels:
Place the labels differently for each curve:
PlotLabels"Expressions" uses functions as curve labels:
Use callouts to identify the curves:
Use None to not add a label:
PlotLegends (7)
PlotStyle (3)
ReImLabels (2)
Applications (7)
Plot the solution of a complex differential equation with initial conditions:
Plot the eigenvalues of a matrix as a function of a parameter:
Plot solutions of an equation as a function of a parameter:
Plot fractional derivatives of :
Plot the complex solution of the Schrödinger equation for a particle in a box:
Properties & Relations (8)
ReImPlot is a special case of Plot:
Use AbsArgPlot to plot the magnitude and argument over the real numbers:
ComplexPlot shows the argument and magnitude of a function using color:
Use ComplexPlot3D to use the z axis for the magnitude:
Use ComplexListPlot to show the location of complex numbers in the plane:
ComplexContourPlot plots curves over the complexes:
ComplexRegionPlot plots regions over the complexes:
ComplexStreamPlot and ComplexVectorPlot treat complex numbers as directions:
Possible Issues (1)
ScalingFunctions applies to the real and imaginary parts:
Text
Wolfram Research (2019), ReImPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/ReImPlot.html (updated 2021).
CMS
Wolfram Language. 2019. "ReImPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ReImPlot.html.
APA
Wolfram Language. (2019). ReImPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ReImPlot.html