Reputation: 1045
Given a DataFrame data
of point coordinates 'x'
, 'y'
and hex string colors (e.g. '#ab1234'
), how do I set the color of each point using the 'color'
column? I have tried the following but in both cases the colors appear random:
from altair import Chart
points = Chart(data).mark_point().encode(
x='x:Q',
y='y:Q'
).encode(color='color')
points = Chart(data).mark_point().encode(
x='x:Q',
y='y:Q',
color='color'
)
Upvotes: 0
Views: 263