Cleanup after transitioning plots to Tabs
This commit is contained in:
parent
6bd2398f5e
commit
9bbed3b55d
@ -65,7 +65,6 @@ setTimeout(function() {
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
PROPOSAL_PATH = "/afs/psi.ch/project/sinqdata/2020/zebra/"
|
PROPOSAL_PATH = "/afs/psi.ch/project/sinqdata/2020/zebra/"
|
||||||
PLOT_TYPES = ("single scan", "overview")
|
|
||||||
|
|
||||||
|
|
||||||
def color_palette(n_colors):
|
def color_palette(n_colors):
|
||||||
@ -273,50 +272,33 @@ def create():
|
|||||||
plot.add_layout(Grid(dimension=1, ticker=BasicTicker()))
|
plot.add_layout(Grid(dimension=1, ticker=BasicTicker()))
|
||||||
|
|
||||||
plot_scatter_source = ColumnDataSource(dict(x=[0], y=[0], y_upper=[0], y_lower=[0]))
|
plot_scatter_source = ColumnDataSource(dict(x=[0], y=[0], y_upper=[0], y_lower=[0]))
|
||||||
plot.add_glyph(
|
plot.add_glyph(plot_scatter_source, Scatter(x="x", y="y", line_color="steelblue"))
|
||||||
plot_scatter_source, Scatter(x="x", y="y", line_color="steelblue", name="single scan")
|
|
||||||
)
|
|
||||||
plot.add_layout(
|
plot.add_layout(
|
||||||
Whisker(
|
Whisker(source=plot_scatter_source, base="x", upper="y_upper", lower="y_lower")
|
||||||
source=plot_scatter_source,
|
|
||||||
base="x",
|
|
||||||
upper="y_upper",
|
|
||||||
lower="y_lower",
|
|
||||||
name="single scan",
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
plot_line_smooth_source = ColumnDataSource(dict(x=[0], y=[0]))
|
plot_line_smooth_source = ColumnDataSource(dict(x=[0], y=[0]))
|
||||||
plot.add_glyph(
|
plot.add_glyph(
|
||||||
plot_line_smooth_source,
|
plot_line_smooth_source, Line(x="x", y="y", line_color="steelblue", line_dash="dashed"),
|
||||||
Line(x="x", y="y", line_color="steelblue", line_dash="dashed", name="single scan"),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
plot_gauss_source = ColumnDataSource(dict(x=[0], y=[0]))
|
plot_gauss_source = ColumnDataSource(dict(x=[0], y=[0]))
|
||||||
plot.add_glyph(
|
plot.add_glyph(
|
||||||
plot_gauss_source,
|
plot_gauss_source, Line(x="x", y="y", line_color="red", line_dash="dashed"),
|
||||||
Line(x="x", y="y", line_color="red", line_dash="dashed", name="single scan"),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
plot_bkg_source = ColumnDataSource(dict(x=[0], y=[0]))
|
plot_bkg_source = ColumnDataSource(dict(x=[0], y=[0]))
|
||||||
plot.add_glyph(
|
plot.add_glyph(
|
||||||
plot_bkg_source,
|
plot_bkg_source, Line(x="x", y="y", line_color="green", line_dash="dashed"),
|
||||||
Line(x="x", y="y", line_color="green", line_dash="dashed", name="single scan"),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
plot_peak_source = ColumnDataSource(dict(x=[], y=[]))
|
plot_peak_source = ColumnDataSource(dict(x=[], y=[]))
|
||||||
plot.add_glyph(
|
plot.add_glyph(plot_peak_source, Asterisk(x="x", y="y", size=10, line_color="red"))
|
||||||
plot_peak_source, Asterisk(x="x", y="y", size=10, line_color="red", name="single scan")
|
|
||||||
)
|
|
||||||
|
|
||||||
numfit_min_span = Span(
|
numfit_min_span = Span(location=None, dimension="height", line_dash="dashed")
|
||||||
location=None, dimension="height", line_dash="dashed", name="single scan"
|
|
||||||
)
|
|
||||||
plot.add_layout(numfit_min_span)
|
plot.add_layout(numfit_min_span)
|
||||||
|
|
||||||
numfit_max_span = Span(
|
numfit_max_span = Span(location=None, dimension="height", line_dash="dashed")
|
||||||
location=None, dimension="height", line_dash="dashed", name="single scan"
|
|
||||||
)
|
|
||||||
plot.add_layout(numfit_max_span)
|
plot.add_layout(numfit_max_span)
|
||||||
|
|
||||||
plot.add_tools(PanTool(), WheelZoomTool(), ResetTool())
|
plot.add_tools(PanTool(), WheelZoomTool(), ResetTool())
|
||||||
@ -332,9 +314,7 @@ def create():
|
|||||||
ov_plot.add_layout(Grid(dimension=1, ticker=BasicTicker()))
|
ov_plot.add_layout(Grid(dimension=1, ticker=BasicTicker()))
|
||||||
|
|
||||||
ov_plot_mline_source = ColumnDataSource(dict(xs=[], ys=[], param=[], color=[]))
|
ov_plot_mline_source = ColumnDataSource(dict(xs=[], ys=[], param=[], color=[]))
|
||||||
ov_plot.add_glyph(
|
ov_plot.add_glyph(ov_plot_mline_source, MultiLine(xs="xs", ys="ys", line_color="color"))
|
||||||
ov_plot_mline_source, MultiLine(xs="xs", ys="ys", line_color="color", name="overview")
|
|
||||||
)
|
|
||||||
|
|
||||||
ov_plot.add_tools(PanTool(), WheelZoomTool(), ResetTool())
|
ov_plot.add_tools(PanTool(), WheelZoomTool(), ResetTool())
|
||||||
ov_plot.toolbar.logo = None
|
ov_plot.toolbar.logo = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user