While I can get a chord diagram using my own data, I would also like to add labels next to the ‘slices’ in a similar fashion as shown in https://moderndata.plot.ly/filled-chord-diagram-in-r-using-plotly/ (at the bottom). In the R example of the Plotly library I see there is a function called ‘add_text’, which I cannot find in the Python version of the library.
I tried using annotations in the make_layout function, but while this does add text, it is not possible to position the text and it also crops the image.
Does anybody have any clue as how to achieve this seemingly simple task of adding slice labels?
See https://plot.ly/python/text-and-annotations/#simple-annotation for an example of positioning annotation text in data coordinates (which is what I think you’ll want since the chord diagram args are defined as scatter traces). Note the xref and yref properties.
Hello,
Has there been any progress with this? I wondered whether there was now a simpler way to add labels to the outer edges of a chord digram in plotly? I am confused how to write a function such that the labels will be automatically added to each segment.