diff --git a/tools/plot-tools/abacus_plot/dos.py b/tools/plot-tools/abacus_plot/dos.py index f128f931252..a2d74904c51 100644 --- a/tools/plot-tools/abacus_plot/dos.py +++ b/tools/plot-tools/abacus_plot/dos.py @@ -248,7 +248,7 @@ def _read(self): orb['data'] = np.asarray(data, dtype=float) self.orbitals.append(orb) - self.energy = np.reshape(e_list, newshape=(-1, 1)).astype(float) + self.energy = np.reshape(e_list, (-1, 1)).astype(float) def _all_sum(self) -> Tuple[np.ndarray, int]: res = np.zeros_like(self.orbitals[0]["data"], dtype=float) @@ -423,9 +423,9 @@ def _parial_plot(self, dosplot.plot_params["xlabel_params"]) else: dosplot.ax.set_xlabel("Energy(eV)", size=25) - dosplot.ax = self._plot(dosplot, energy_f, tdos, "TDOS") + self._plot(dosplot, energy_f, tdos, "TDOS") for elem in dos.keys(): - dosplot.ax = self._plot(dosplot, energy_f, dos[elem], elem) + self._plot(dosplot, energy_f, dos[elem], elem) if "notes" in dosplot.plot_params.keys(): dosplot._set_figure(energy_range, dos_range, notes=dosplot.plot_params["notes"])