My chart looks like this:
But I want it to match this chart almost exactly:
How can I remove the ticks on the Y-axis but keep the percent labels? Also, is there a way to create more space between the percent labels and the start of the bars like in the original image?
This is the code I'm using:
chart = alt.Chart(percentages_df).mark_bar(size=17, color= '#e6ab02').encode(
# encode x as the percent, and hide the axis
x=alt.X(
'PERCENT',axis=None),
y=alt.Y(
'PERCENT_TEXT',
axis=alt.Axis(tickCount=5,title='') ,sort='-y'))
text = alt.Chart(percentages_df).mark_text().encode(
y=alt.Y('PERCENT_TEXT',axis=None, sort='-y'),
text='EMOJI'
)
new_chart = alt.hconcat(text, chart).configure_view(strokeWidth=0).configure_axis(grid=False)
new_chart


