✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

# Colorbar Title LaTeX Rendering

I’m trying to implement a colorbar title using LaTeX formatting using the following code:

fig = go.Figure()
y=y,
mode='markers',
marker=dict(symbol='circle',size=12,line=dict(width=1,color='SlateGray'),
opacity=0.75,color=log_mbh,colorscale='Rainbow',showscale=True,
colorbar=dict(title=dict(text='$\alpha$',side='top'),thickness=50),
),
)
)



which results in the following plot:

Is there a reason why the LaTex colorbar title is vertical rather than on top? Is there a work-around for this problem?

Update: I have found a workaround but not a solution. This is definitely a bug as far as I cant tell.

One option, if you do not require Greek alphabet, is to simply use HTML code, simply using italics, superscripts or subscripts.

If one wants to use Greek letters, HTML entities don’t work, but a few decimal and hexadecimal codes do work.

This issue should be addressed, especially if Plotly is to be used for publishing purposes. Otherwise, Matplotlib is the alternative that does work.

Thanks @maelstromscientist for pointing out this issue. To get it fixed, please open it on plotly.js https://github.com/plotly/plotly.js/issues.

I have opened an issue at plotly.py:

https://github.com/plotly/plotly.py/issues/2231

However, I will open this issue in plotly.js as well.

1 Like

I hope this issue gets fixed with haste.