Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a diverging color map with a neutral central color
ResourceFunction["DivergentColorFunction"][col1, col2] returns a diverging color map that interpolates between col1 and col2, with a neutral, unsaturated color in the center of the input range. | |
ResourceFunction["DivergentColorFunction"]["CoolToWarm"] returns the color map demonstrated in the paper "Diverging Color Maps for Scientific Visualization" by Kenneth Moreland. | |
Choose two colors and create a color function from them:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| Out[2]= |
| In[3]:= |
| Out[3]= | ![]() |
Create a color function using a built-in color scheme:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
Compare this with the same plot using the unmodified scheme:
| In[5]:= |
| Out[5]= | ![]() |
Create a plotting function to visualize color maps:
| In[6]:= | ![]() |
Now recreate the example color functions from Kenneth Moreland’s "Diverging Color Maps for Scientific Visualization":
| In[7]:= | ![]() |
| Out[7]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License