Skip to content

Commit

Permalink
increasing fat_bands_slide/ removing spline (aiidalab#883)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresOrtegaGuerrero authored Oct 23, 2024
1 parent 30ea955 commit b0cfdbd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/aiidalab_qe/common/bandpdoswidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,13 @@ def _add_band_traces(self, fig):
)

scatter_objects.append(
go.Scatter(
go.Scattergl(
x=x_bands_comb,
y=y_bands_comb - fermi_energy,
mode="lines",
line={
"color": colors[(spin_polarized, spin)],
"shape": "spline",
"smoothing": 1.3,
"shape": "linear",
},
showlegend=False,
)
Expand Down Expand Up @@ -318,15 +317,14 @@ def _add_pdos_traces(self, fig):
y_data = (
dos_np - fermi_energy if self.plot_type == "combined" else trace["y"]
)
scatter_objects[i] = go.Scatter(
scatter_objects[i] = go.Scattergl(
x=x_data,
y=y_data,
fill=fill,
name=trace["label"],
line={
"color": trace["borderColor"],
"shape": "spline",
"smoothing": 1.0,
"shape": "linear",
},
legendgroup=trace["label"],
)
Expand All @@ -352,7 +350,7 @@ def _add_projection_traces(self, fig):
self.fermi_energy.get("fermi_energy"),
)
scatter_objects.append(
go.Scatter(
go.Scattergl(
x=proj_bands["x"],
y=np.array(proj_bands["y"]) - fermi_energy,
fill="toself",
Expand Down Expand Up @@ -586,7 +584,7 @@ def __init__(self, bands=None, pdos=None, **kwargs):
self.proj_bands_width_slider = ipw.FloatSlider(
value=0.5,
min=0.01,
max=0.76,
max=2.0,
step=0.01,
description="`Fat bands` max width (eV):",
orientation="horizontal",
Expand Down

0 comments on commit b0cfdbd

Please sign in to comment.