Support inverted label text option for Chord plot
See original GitHub issueALL software version info
holoviews=1.13.3, bokeh=2.1.1
Description of expected behavior and the observed behavior
The label texts in the left half of the chord plot getting inverted.
It would be good if the default label text orientation can be made something like this image below:
Example code
import pandas as pd
import holoviews as hv
from holoviews import opts, dim
from bokeh.sampledata.les_mis import data
hv.extension('bokeh')
hv.output(size=300)
links = pd.DataFrame(data['links'])
nodes = hv.Dataset(pd.DataFrame(data['nodes']), 'index')
chord = hv.Chord((links, nodes)).select(value=(5, None))
chord.opts(
opts.Chord(cmap='Category20', edge_cmap='Category20', edge_color=dim('source').str(), label_text_font_size='15px',
labels='name', node_color=dim('index').str()))
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Label text are inverted in the left half of Holoviews Chord plot
Hi, I have created a Holoviews Chord plot using some data and everything is fine. However the label texts in the left half...
Read more >inverted label text (half turn) for Chord diagram on holoviews ...
This was quite difficult. If the label text is just a few characters long this solution with a hook might be appropriate.
Read more >Chapter 15 Advanced usage of chordDiagram()
By default, chordDiagram() creates two tracks, one track for labels and one track ... Several empty tracks can be allocated before Chord diagram...
Read more >Chord Pro Features For Chord Diagrams - Data Crayon
Chord Colours; Opacity; Reverse Gradients; Arc Numbers; Diagram Title ... Label Wrapping; Margins; Font-size; Popup Width; Popup Text ...
Read more >Inverted Label Text (Half Turn) For Chord Diagram ... - ADocLib
The label texts in the left half of the chord plot getting inverted. inverted. It would be good if the default label text...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I wrote a function to rotate the label text also for bokeh as backend. Not perfect, but maybe useful: https://stackoverflow.com/a/65610161
@janrygl, I tried your function and get the following error: WARNING:param.ChordPlot13794: Plotting hook <function rotate_label at 0x0000019D040C11F8> could not be applied:
‘labels’
– UPDATE –
janrygl’s solution only works by selecting matplotlib as plotting library backend with
hv.extension("matplotlib")
, which is not clear from his answer. Otherwise the above-mentioned error occurs.