Remove hkl arrows
This commit is contained in:
parent
f0488f5648
commit
4dd7644596
@ -7,7 +7,6 @@ import tempfile
|
||||
import numpy as np
|
||||
from bokeh.layouts import column, row
|
||||
from bokeh.models import (
|
||||
Arrow,
|
||||
Button,
|
||||
CheckboxGroup,
|
||||
ColumnDataSource,
|
||||
@ -16,7 +15,6 @@ from bokeh.models import (
|
||||
Legend,
|
||||
LegendItem,
|
||||
MultiSelect,
|
||||
NormalHead,
|
||||
NumericInput,
|
||||
Panel,
|
||||
RadioGroup,
|
||||
@ -423,17 +421,6 @@ def create():
|
||||
grid_source.data.update(xs=xs, ys=ys)
|
||||
minor_grid_source.data.update(xs=xs_minor, ys=ys_minor)
|
||||
|
||||
arrow1.visible = True
|
||||
arrow1.x_end = x_c[0]
|
||||
arrow1.y_end = x_c[1]
|
||||
arrow2.visible = True
|
||||
arrow2.x_end = y_c[0]
|
||||
arrow2.y_end = y_c[1]
|
||||
|
||||
kvect_source.data.update(
|
||||
x=[x_c[0] / 2, y_c[0] / 2 - 0.1], y=[x_c[1] - 0.1, y_c[1] / 2], text=["h", "k"]
|
||||
)
|
||||
|
||||
def _update_slice():
|
||||
cut_tol = hkl_delta.value
|
||||
cut_or = hkl_cut.value
|
||||
@ -548,14 +535,6 @@ def create():
|
||||
source=scatter_source, marker="m", size="s", fill_color="c", line_color="c"
|
||||
)
|
||||
|
||||
arrow1 = Arrow(x_start=0, y_start=0, x_end=0, y_end=0, end=NormalHead(size=10), visible=False)
|
||||
plot.add_layout(arrow1)
|
||||
arrow2 = Arrow(x_start=0, y_start=0, x_end=0, y_end=0, end=NormalHead(size=10), visible=False)
|
||||
plot.add_layout(arrow2)
|
||||
|
||||
kvect_source = ColumnDataSource(dict(x=[], y=[], text=[]))
|
||||
plot.text(source=kvect_source)
|
||||
|
||||
plot.add_layout(Legend(items=[], location="top_left", click_policy="hide"))
|
||||
|
||||
hkl_div = Div(text="HKL:", margin=(5, 5, 0, 5))
|
||||
|
@ -5,7 +5,6 @@ import os
|
||||
import numpy as np
|
||||
from bokeh.layouts import column, row
|
||||
from bokeh.models import (
|
||||
Arrow,
|
||||
Button,
|
||||
CheckboxGroup,
|
||||
ColumnDataSource,
|
||||
@ -13,11 +12,9 @@ from bokeh.models import (
|
||||
FileInput,
|
||||
Legend,
|
||||
LegendItem,
|
||||
NormalHead,
|
||||
NumericInput,
|
||||
RadioGroup,
|
||||
Range1d,
|
||||
Spacer,
|
||||
Spinner,
|
||||
TextAreaInput,
|
||||
TextInput,
|
||||
@ -210,17 +207,6 @@ class PlotHKL:
|
||||
grid_source.data.update(xs=xs, ys=ys)
|
||||
minor_grid_source.data.update(xs=xs_minor, ys=ys_minor)
|
||||
|
||||
arrow1.visible = True
|
||||
arrow1.x_end = x_c[0]
|
||||
arrow1.y_end = x_c[1]
|
||||
arrow2.visible = True
|
||||
arrow2.x_end = y_c[0]
|
||||
arrow2.y_end = y_c[1]
|
||||
|
||||
kvect_source.data.update(
|
||||
x=[x_c[0] / 2, y_c[0] / 2 - 0.1], y=[x_c[1] - 0.1, y_c[1] / 2], text=["h", "k"]
|
||||
)
|
||||
|
||||
# Prepare hkl/mhkl data
|
||||
hkl_coord2 = []
|
||||
for j, fname in enumerate(upload_hkl_fi.filename):
|
||||
@ -377,18 +363,6 @@ class PlotHKL:
|
||||
plot.yaxis.visible = False
|
||||
plot.ygrid.visible = False
|
||||
|
||||
arrow1 = Arrow(
|
||||
x_start=0, y_start=0, x_end=0, y_end=0, end=NormalHead(size=10), visible=False
|
||||
)
|
||||
plot.add_layout(arrow1)
|
||||
arrow2 = Arrow(
|
||||
x_start=0, y_start=0, x_end=0, y_end=0, end=NormalHead(size=10), visible=False
|
||||
)
|
||||
plot.add_layout(arrow2)
|
||||
|
||||
kvect_source = ColumnDataSource(dict(x=[], y=[], text=[]))
|
||||
plot.text(source=kvect_source)
|
||||
|
||||
grid_source = ColumnDataSource(dict(xs=[], ys=[]))
|
||||
plot.multi_line(source=grid_source, line_color="gray")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user