Private
Public Access
1
0

avoid scientific notation on log axis

This commit is contained in:
Sander Roosendaal
2020-10-25 08:38:32 +01:00
parent 6069e2c810
commit 6c693bcc35

View File

@@ -29,7 +29,9 @@ from bokeh.layouts import layout,widgetbox
from bokeh.palettes import Category20c,Category10 from bokeh.palettes import Category20c,Category10
from bokeh.layouts import row as layoutrow from bokeh.layouts import row as layoutrow
from bokeh.layouts import column as layoutcolumn from bokeh.layouts import column as layoutcolumn
from bokeh.models import LinearAxis,LogAxis,Range1d,DatetimeTickFormatter,HoverTool from bokeh.models import (
LinearAxis,LogAxis,Range1d,DatetimeTickFormatter,HoverTool,Axis,PrintfTickFormatter
)
#from bokeh.io import output_file, show, vplot #from bokeh.io import output_file, show, vplot
from bokeh.models import ( from bokeh.models import (
GMapPlot, GMapOptions, ColumnDataSource, Circle, GMapPlot, GMapOptions, ColumnDataSource, Circle,
@@ -2960,6 +2962,8 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
plot.extra_y_ranges = {"watermark": watermarkrange} plot.extra_y_ranges = {"watermark": watermarkrange}
plot.sizing_mode = 'scale_width' plot.sizing_mode = 'scale_width'
plot.image_url([watermarkurl],1.8*max(thesecs),watermarky, plot.image_url([watermarkurl],1.8*max(thesecs),watermarky,
watermarkw,watermarkh, watermarkw,watermarkh,
global_alpha=watermarkalpha, global_alpha=watermarkalpha,
@@ -2982,6 +2986,10 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
title = "Critical Power for "+rowername title = "Critical Power for "+rowername
plot.title.text = title plot.title.text = title
xaxis = plot.select(dict(type=Axis, layout="below"))[0]
xaxis.formatter = PrintfTickFormatter(format="%5f")
#xaxis.formatter.use_scientific = False
hover = plot.select(dict(type=HoverTool)) hover = plot.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([ hover.tooltips = OrderedDict([