How to create a grouped bar chart in Altair?
问题 How does one create a grouped bar chart in Altair? I'm trying the following but it is just producing two graphs side by side. Chart(data).mark_bar().encode( column='Gender', x='Genre', y='Rating', color='Gender' ) 回答1: Example of group bar chart I show a simplified example of Grouped Bar Chart from Altair's documentation. You can also see the full documentation here. Basically, you have to specify x-axis Gender (F or M in each subplot), y-axis as Rating and Genre as Column . from altair