Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Map the argument of a complex number to a color
ResourceFunction["ArgHue"][arg] returns Hue[h,1,1] where h depends on the value of arg. | |
ResourceFunction["ArgHue"][arg,abs] creates a Hue based on the argument arg and magnitude abs of a complex value. |
ZeroColor | White | approach this color as the parameter abs approaches zero |
When arg is a real number, ArgHue[arg] returns a hue with full saturation and full brightness:
In[1]:= |
Out[1]= |
Display the above colors in a way that indicates the direction in the complex plane they represent:
In[2]:= |
Out[2]= |
Make a color wheel around the origin of the complex plane:
In[3]:= |
Out[3]= |
When the ZeroColor setting is White, ArgHue[arg,abs] returns a color that approaches White as abs approaches 0:
In[4]:= |
Out[5]= |
When the ZeroColor setting is Black, ArgHue[arg,abs] returns a color that approaches Black as abs approaches 0:
In[6]:= |
Out[7]= |
Specify that White should be used where the function approaches zero:
In[8]:= |
Out[9]= |
Specify that GrayLevel[0.4] should be used where the function approaches zero:
In[10]:= |
Out[11]= |
Specify that RGBColor[1,0.8,0.8] should be used where the function approaches zero:
In[12]:= |
Out[12]= |
Use ArgHue in the ColorFunction setting of ComplexPlot with the hue indicating the argument of the function value:
In[14]:= |
Out[14]= |
Use ArgHue in the ColorFunction setting of ComplexPlot with the hue indicating the argument of the function value and a color that approaches White as the function value approaches zero:
In[15]:= |
Out[16]= |
Use ArgHue in the ColorFunction setting of ComplexPlot with the hue indicating the argument of the function value and a color that approaches Black as the function value approaches zero:
In[17]:= |
Out[18]= |
Use ArgHue in the ColorFunction setting of ComplexPlot3D with the hue indicating the argument of the function value:
In[19]:= |
Out[19]= |
Use ArgHue in the ColorFunction setting of ComplexPlot3D with the hue indicating the argument of the function value and a color that approaches White as the function value approaches zero:
In[20]:= |
Out[21]= |
Use ArgHue in the ColorFunction setting of ComplexPlot3D with the hue indicating the argument of the function value and a color that approaches Black as the function value approaches zero:
In[22]:= |
Out[23]= |
Use ArgHue in the ColorFunction setting of ComplexListPlot with the hue indicating the argument of the function value:
In[24]:= |
Out[25]= |
Use ArgHue in the ColorFunction setting of ComplexListPlot with the hue indicating the argument of the function value and a color that approaches White as the function value approaches zero:
In[26]:= |
Out[3]= |
Use ArgHue in the ColorFunction setting of ComplexListPlot with the hue indicating the argument of the function value and a color that approaches Black as the function value approaches zero:
In[27]:= |
Out[28]= |
Use ArgHue in the ColorFunction setting in ComplexArrayPlot with the hue indicating the argument of the function value:
In[29]:= |
Out[30]= |
Use ArgHue in the ColorFunction setting of ComplexArrayPlot with the hue indicating the argument of the function value and a color that approaches White as the function value approaches zero:
In[31]:= |
Out[32]= |
Use ArgHue in the ColorFunction setting of ComplexArrayPlot with the hue indicating the argument of the function value and a color that approaches Black as the function value approaches zero:
In[33]:= |
Out[34]= |
ArgHue[h] is periodic with period 2π:
In[35]:= |
Out[35]= |
This work is licensed under a Creative Commons Attribution 4.0 International License