From b0cfdbd50ea948a4af886afe3dbad39d21a790d5 Mon Sep 17 00:00:00 2001 From: AndresOrtegaGuerrero <34098967+AndresOrtegaGuerrero@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:56:46 +0200 Subject: [PATCH] increasing fat_bands_slide/ removing spline (#883) --- src/aiidalab_qe/common/bandpdoswidget.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/aiidalab_qe/common/bandpdoswidget.py b/src/aiidalab_qe/common/bandpdoswidget.py index d1b512a9e..c471b3150 100644 --- a/src/aiidalab_qe/common/bandpdoswidget.py +++ b/src/aiidalab_qe/common/bandpdoswidget.py @@ -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, ) @@ -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"], ) @@ -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", @@ -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",