Heatmap text layout

Hi everyone, I have the following heatmap:

There are some numbers that exit the rect glyph (big ones). I’d like to know if there is a way to let the text starts not in the middle of the rect (like a 0,0 coordinate), but to a personalized part, more to the left side. In this case I’ll not increase the width of the rects to avoid such a situation.

Hope to be clear, thank you! :slight_smile:

Hi David,

There’s “text_align” property that should work in your case: Appearance — Bokeh 3.3.2 Documentation

Regards,

Eugene

···

On Friday, February 2, 2018 at 4:42:10 PM UTC+7, David Laguardia wrote:

Hi everyone, I have the following heatmap:

There are some numbers that exit the rect glyph (big ones). I’d like to know if there is a way to let the text starts not in the middle of the rect (like a 0,0 coordinate), but to a personalized part, more to the left side. In this case I’ll not increase the width of the rects to avoid such a situation.

Hope to be clear, thank you! :slight_smile:

It works!
thank you Eugene!

···

2018-02-02 12:55 GMT+01:00 Eugene Pakhomov [email protected]:

Hi David,

There’s “text_align” property that should work in your case: https://bokeh.pydata.org/en/latest/docs/user_guide/styling.html#text-properties

Regards,

Eugene

On Friday, February 2, 2018 at 4:42:10 PM UTC+7, David Laguardia wrote:

Hi everyone, I have the following heatmap:

There are some numbers that exit the rect glyph (big ones). I’d like to know if there is a way to let the text starts not in the middle of the rect (like a 0,0 coordinate), but to a personalized part, more to the left side. In this case I’ll not increase the width of the rects to avoid such a situation.

Hope to be clear, thank you! :slight_smile:

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/7430f512-63ab-49fe-be14-8e7cef1026ad%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

David Laguardia