Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Visually classify soil sample types by their relative sand, silt and clay contents
ResourceFunction["SoilTexturePlot"][] plots the standard USDA soil texture diagram. | |
ResourceFunction["SoilTexturePlot"][samples] plots a soil texture diagram overlaid with points samples, with soil samples provided in the format {sand,clay,silt}. |
| Soil type | RGB values |
| "Silt" | {0,256,0} |
| "Silty clay loam" | {37,204,135} |
| "Silty clay" | {106,256,191} |
| "Silt loam" | {126,203,0} |
| "Clay loam" | {181,256,48} |
| "Loam" | {206,137,0} |
| "Sandy clay" | {256,0,0} |
| "Sandy clay loam" | {256,128,136} |
| "Sandy loam" | {256,189,256} |
| "Loamy sand" | {256,191,195} |
| "Sand" | {256,193,131} |
| "Clay" | {256,256,125} |
Plot the standard USDA soil texture diagram:
| In[1]:= |
| Out[1]= | ![]() |
Visually classify a single soil sample with the given relative quantities on the soil texture diagram:
| In[2]:= |
| Out[2]= | ![]() |
Overlay soil samples on the soil texture diagram:
| In[3]:= | ![]() |
| Out[3]= | ![]() |
By default, the diagram is plotted with grid lines (GridLines→True):
| In[4]:= |
| Out[4]= | ![]() |
Plot the soil texture diagram without grid lines:
| In[5]:= |
| Out[5]= | ![]() |
Plot the soil texture diagram with custom grid lines, following the grid line specification conventions of TernaryListPlot:
| In[6]:= | ![]() |
| Out[6]= | ![]() |
Use a grayscale theme:
| In[7]:= |
| Out[7]= | ![]() |
Recolor the region corresponding to a soil type on the plot:
| In[8]:= |
| Out[8]= | ![]() |
Recolor all soil type regions:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
Recolor soil type regions using a function:
| In[10]:= | ![]() |
| Out[10]= | ![]() |
Visualize the classification of soil sand, clay, and silt composition samples:
| In[11]:= |
| In[12]:= |
| Out[12]= | ![]() |
Study samples from parametric distributions:
| In[13]:= | ![]() |
| In[14]:= |
| Out[14]= | ![]() |
Negative samples can invalidate results:
| In[15]:= |
| Out[15]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License