Created
March 19, 2020 14:11
-
-
Save AntonioMarsella/fb290f2fee8bf7b352c1c370a6e9bfc3 to your computer and use it in GitHub Desktop.
bokeh color mapping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bokeh.models import CategoricalColorMapper | |
mapper = CategoricalColorMapper(factors=['setosa', 'virginica', 'versicolor], palette=['red', 'green', 'blue']) | |
plot = figure(x_axis_label='petal_length', y_axis_label='sepal_length') | |
plot.circle('petal_length', 'sepal_length', size=10, source=source, color={'field': 'species', 'transform': mapper}= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment