Created
March 1, 2018 18:29
-
-
Save kindofluke/fac4851221ae68e6785ccda158259f69 to your computer and use it in GitHub Desktop.
PieAltair
This file contains 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 altair import Row, Column, Chart, Text, Scale, Color | |
source_altair_chart = Chart(source_df).mark_text( | |
applyColorToBackground=True | |
).mark_bar().encode(x='FoodCode',y='Source', color=Color('Source', scale=Scale(range=colors))) | |
#"scale": {"scheme": "bluepurple"} doesn't work | |
flavor_altair_chart = Chart(flavor_df).mark_text( | |
applyColorToBackground=True | |
).mark_bar().encode(x='Source',y='FoodCode', color=Color('FoodCode', scale=Scale(range=colors))) | |
display(source_altair_chart, flavor_altair_chart) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment