color
property_to_color(prop, cmap='viridis', **kwargs)
Convert a scalar array of property values to colors, given a provided color map (or property name).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prop |
array_like
|
the scalar array of property values |
required |
cmap |
str
|
the color map name or property name |
'viridis'
|
vmin |
float
|
the minimum value of the property color scale |
required |
vmax |
float
|
the maximum value of the property color scale |
required |
kwargs |
dict
|
optional keyword arguments |
{}
|
Returns:
Name | Type | Description |
---|---|---|
array_like |
the array of color values for the given property |