generates a plot of Abs[f] colored by Arg[f] as a function of x from xmin to xmax.


plots several functions.


plots fi with features defined by the symbolic wrapper w.


takes the variable x to be in the geometric region reg.

Details and Options

  • AbsArgPlot evaluates f at different values of x to create smooth curves of the form {x,Abs[f[x]]} colored by {x,Arg[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.
  • AbsArgPlot treats the variable x as local, effectively using Block.
  • AbsArgPlot has the 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:
  • Automaticautomatically placed labels
    Above, Below, Before, Afterpositions around the curve
    xnear 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
  • AbsArgPlot has the same options as Plot.
  • Possible settings for ClippingStyle are:
  • Automaticuse a dotted line for the clipped portion
    Noneomit the clipped portion of the curve
    styleuse style for the clipped portion
  • With the default settings Exclusions->Automatic and ExclusionsStyle->None, AbsArgPlot 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,}.
  • PlotLabels->"Expressions" uses the fi as the label text.
  • AbsArgPlot 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 AbsArgPlot 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.


open all close all

Basic Examples  (6)

Plot the modulus of a complex function of a real variable colored by its argument:

Click for copyable input

Plot several functions:

Click for copyable input

Label each curve:

Click for copyable input

Include a legend:

Click for copyable input

Fill below a curve:

Click for copyable input

Compare Plot and AbsArgPlot:

Click for copyable input

Scope  (15)

Options  (47)

Applications  (3)

Properties & Relations  (1)

Possible Issues  (2)

Introduced in 2019