Skip to content

[BUG] Bad formatting of y axis labels with theme different from standard #11110

@gioarma

Description

@gioarma

ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)

  • bokeh 2.3.0
  • python 3.8.5
  • jupyterlab 3.0.10
  • macOS Catalina (10.15.7)
  • Google Chrome (89.0.4389.90)

Description of expected behavior and the observed behavior

When using a theme that is different from default, if the data are in sceintific notation along the y axis the numbers overlap with the y axis

Complete, minimal, self-contained example code that reproduces the issue

Using the axample code provided in the docs (https://docs.bokeh.org/en/latest/docs/reference/themes.html)

from bokeh.plotting import figure, output_file, show
from bokeh.themes import built_in_themes
from bokeh.io import curdoc

x = [1, 2, 3, 4, 5]
y = [6e-5, 7e-5, 6e-5, 4e-5, 5e-5]

output_file("caliber.html")
p = figure(title='caliber', plot_width=300, plot_height=300)
p.line(x, y)
show(p)

Schermata 2021-03-29 alle 10 50 47

BUT if I set:

curdoc().theme = 'light_minimal'

The same code yields:
Schermata 2021-03-29 alle 10 50 56

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions