Skip to content

Commit b0cfdbd

Browse files
increasing fat_bands_slide/ removing spline (#883)
1 parent 30ea955 commit b0cfdbd

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/aiidalab_qe/common/bandpdoswidget.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,13 @@ def _add_band_traces(self, fig):
274274
)
275275

276276
scatter_objects.append(
277-
go.Scatter(
277+
go.Scattergl(
278278
x=x_bands_comb,
279279
y=y_bands_comb - fermi_energy,
280280
mode="lines",
281281
line={
282282
"color": colors[(spin_polarized, spin)],
283-
"shape": "spline",
284-
"smoothing": 1.3,
283+
"shape": "linear",
285284
},
286285
showlegend=False,
287286
)
@@ -318,15 +317,14 @@ def _add_pdos_traces(self, fig):
318317
y_data = (
319318
dos_np - fermi_energy if self.plot_type == "combined" else trace["y"]
320319
)
321-
scatter_objects[i] = go.Scatter(
320+
scatter_objects[i] = go.Scattergl(
322321
x=x_data,
323322
y=y_data,
324323
fill=fill,
325324
name=trace["label"],
326325
line={
327326
"color": trace["borderColor"],
328-
"shape": "spline",
329-
"smoothing": 1.0,
327+
"shape": "linear",
330328
},
331329
legendgroup=trace["label"],
332330
)
@@ -352,7 +350,7 @@ def _add_projection_traces(self, fig):
352350
self.fermi_energy.get("fermi_energy"),
353351
)
354352
scatter_objects.append(
355-
go.Scatter(
353+
go.Scattergl(
356354
x=proj_bands["x"],
357355
y=np.array(proj_bands["y"]) - fermi_energy,
358356
fill="toself",
@@ -586,7 +584,7 @@ def __init__(self, bands=None, pdos=None, **kwargs):
586584
self.proj_bands_width_slider = ipw.FloatSlider(
587585
value=0.5,
588586
min=0.01,
589-
max=0.76,
587+
max=2.0,
590588
step=0.01,
591589
description="`Fat bands` max width (eV):",
592590
orientation="horizontal",

0 commit comments

Comments
 (0)