Am I just blindfolded, or is ther no way to set the axis tick labels bold?
Thanks,
Bob
I don't think there is currently. Feel free to request this over at https://github.com/plotly/plotly.js
@robertleitner - Actually, plotly.js
supports a subset of html labels. So, use <b>bold text</b>
Plotly uses a subset of HTML tags to do things like newline (
<br>
), bold (<b></b>
), italics (<i></i>
), hyperlinks (<a href='...'></a>
). Tags<em>
,<sup>
,<sub>
<span>
are also supported.
Reference: https://plot.ly/r/reference/
@chriddyp Plot.ly for Python uses this as well. Typing x = '<b>Title</b>'
will bold x
.
I found a workaround today which does not need you to set the tags when generating the tick labels, but setting it after the plot has been generated.
You can just update your ticklabels with a suffix and a prefix which recognizes html tags.
This worked for me:
fig.update_yaxes(tickangle = -90,tickprefix="<b>",ticksuffix ="</b><br>")
I found this thread when searching for a souloution and wanted to leave my answer somewhere for people to find.
Great idea with the tickprefix
and ticksuffix
tags!
fig.update_yaxes(tickangle = -90,tickprefix="<b>",ticksuffix ="</b><br>")
Most helpful comment
@robertleitner - Actually,
plotly.js
supports a subset of html labels. So, use<b>bold text</b>
Reference: https://plot.ly/r/reference/