From 6c693bcc350d1c56b6a5757cbeadc409667b1a20 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sun, 25 Oct 2020 08:38:32 +0100 Subject: [PATCH] avoid scientific notation on log axis --- rowers/interactiveplots.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 68f6d5d2..34bd6634 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -29,7 +29,9 @@ from bokeh.layouts import layout,widgetbox from bokeh.palettes import Category20c,Category10 from bokeh.layouts import row as layoutrow 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.models import ( 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.sizing_mode = 'scale_width' + + plot.image_url([watermarkurl],1.8*max(thesecs),watermarky, watermarkw,watermarkh, global_alpha=watermarkalpha, @@ -2982,6 +2986,10 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data', title = "Critical Power for "+rowername 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.tooltips = OrderedDict([