Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Axes args in Layout have no effect in Ribbon plot

I am constructing a Ribbon plot following this tutorial.
Unfortunately, the xaxis and yaxis Layout args have no effect on the plot, while the title and images parameters work fine.

In order to create the Ribbon effect, an axis (in this case the xaxis) must separate or space the plot data in sections or ribbons. Ideally, I would like to override these numerical x tick labels used for spacing with text that labels each ribbon (a person’s name in this case). My plan is to use the xaxis's ticktext and tickvals to achieve this.

Any insight would be greatly appreciated. Thanks!

You’ll need to wrap those axis attributes in go.Scene object for them to have effect on your graph.

Thanks E!
Here is what worked for me:

    scene = go.Scene(xaxis=dict(title="",
                                showticklabels=True,
                                tickvals=[i for i in range(len(labels))],
                                ticktext=labels,
                                ),
                     )

    layout = go.Layout(
                        title='plot title',
                        images=LOGO_SOURCE,
                        scene=scene,
                    )
1 Like