You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Clustergram figures in a Jupyter notebook. When plotting the clusters calculated from a dataframe, I have some long column / row names that I need to show in the figure as labels.
However, the colour scale bar is not automatically adjusted to move to the right to accommodate the extra space taken up by longer text in the row labels.
To Reproduce
importpandasaspdimportdash_bioexample_df=pd.read_csv('https://git.io/clustergram_brain_cancer.csv').set_index('ID_REF')
# add row names row_prefix="A really long name for a row / column"example_df.index= [f"{row_prefix}{i}"foriinexample_df.index]
fig=dash_bio.Clustergram(
data=example_df,
row_labels=list(example_df.index),
)
fig.show()
This gives me:
Expected behavior
The plot should detect the sizing of row / column labels, and if there is enough room (which there is in this case), the colour scale bar should position itself outside the range of this text.
Alternatively, there should be a way to disable the colour bar to prevent obscuring the labels (I have been unable to get this working either with Clustergram)
E.g.
fig.update_coloraxes(showscale=False) # this does not remove anything from the `Clustergram` figure.
Versions
Python 3.12.2
>>>print(dash_bio.__version__)
1.0.2
The text was updated successfully, but these errors were encountered:
I am using
Clustergram
figures in a Jupyter notebook. When plotting the clusters calculated from a dataframe, I have some long column / row names that I need to show in the figure as labels.However, the colour scale bar is not automatically adjusted to move to the right to accommodate the extra space taken up by longer text in the row labels.
To Reproduce
This gives me:
Expected behavior
The plot should detect the sizing of row / column labels, and if there is enough room (which there is in this case), the colour scale bar should position itself outside the range of this text.
Alternatively, there should be a way to disable the colour bar to prevent obscuring the labels (I have been unable to get this working either with
Clustergram
)E.g.
Versions
Python 3.12.2
The text was updated successfully, but these errors were encountered: