Text in ridgeplot blurry

Hi,

I’m trying to place some text in a ridgeplot like this:

for scoring_variable in scored_variables[1:]:

normal_and_patho_curves = make_ridge(scoring_variable, source_data, x)

p_normal.patch(‘x’, ‘y_normal’, alpha=0.6, line_color=‘black’, source=normal_and_patho_curves, color=‘lightsteelblue’)

p_normal.text(27, y=dodge(‘text’, 0.6, range=p_normal.y_range), text=‘text’, source=normal_and_patho_curves, **text_props)

``

it works fine apart from that the text is blurry in the output.

Both inside the jupyterlab notebook and as an exported html-file.

Do I have to set the dpi for the plot or anything else?

I’ve set the resolution to 300x600 and the text_font to 8pt.

I’ve tried different browsers with the same blurry result.

Any ideas what’s wrong here?

Thanks in advance!

Screenshot 2018-11-21 at 14.30.48.png

Hi,

Hi,

I’m trying to place some text in a ridgeplot like this:

for scoring_variable in scored_variables[1:]:

normal_and_patho_curves = make_ridge(scoring_variable, source_data, x)

p_normal.patch(‘x’, ‘y_normal’, alpha=0.6, line_color=‘black’, source=normal_and_patho_curves, color=‘lightsteelblue’)

p_normal.text(27, y=dodge(‘text’, 0.6, range=p_normal.y_range), text=‘text’, source=normal_and_patho_curves, **text_props)

``

it works fine apart from that the text is blurry in the output.

Both inside the jupyterlab notebook and as an exported html-file.

Do I have to set the dpi for the plot or anything else?

I’ve set the resolution to 300x600 and the text_font to 8pt.

I’ve tried different browsers with the same blurry result.

Any ideas what’s wrong here?

it’s hard to tell for sure from an incomplete example, but I suppose p_normal.text() adds many text glyphs one on top another, so you get this blurry image. If you want to annotate a plot, the preferred way is to use Label (or LabelSet) annotation.

Mateusz

···

On Wed, Nov 21, 2018 at 3:26 PM [email protected] wrote:

Thanks in advance!

Screenshot 2018-11-21 at 14.30.48.png

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/275477d3-dbcf-475c-98ec-51651b3bc7c0%40continuum.io.

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

Thank you,

you were totally right!!

Till

···

On Wednesday, November 21, 2018 at 4:09:12 PM UTC+1, mateusz.paprocki wrote:

Hi,
On Wed, Nov 21, 2018 at 3:26 PM [email protected] wrote:

Hi,

I’m trying to place some text in a ridgeplot like this:

for scoring_variable in scored_variables[1:]:

normal_and_patho_curves = make_ridge(scoring_variable, source_data, x)

p_normal.patch(‘x’, ‘y_normal’, alpha=0.6, line_color=‘black’, source=normal_and_patho_curves, color=‘lightsteelblue’)

p_normal.text(27, y=dodge(‘text’, 0.6, range=p_normal.y_range), text=‘text’, source=normal_and_patho_curves, **text_props)

``

it works fine apart from that the text is blurry in the output.

Both inside the jupyterlab notebook and as an exported html-file.

Do I have to set the dpi for the plot or anything else?

I’ve set the resolution to 300x600 and the text_font to 8pt.

I’ve tried different browsers with the same blurry result.

Any ideas what’s wrong here?

it’s hard to tell for sure from an incomplete example, but I suppose p_normal.text() adds many text glyphs one on top another, so you get this blurry image. If you want to annotate a plot, the preferred way is to use Label (or LabelSet) annotation.

Mateusz

Thanks in advance!

Screenshot 2018-11-21 at 14.30.48.png

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/275477d3-dbcf-475c-98ec-51651b3bc7c0%40continuum.io.

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