diff --git a/src/pymatgen/analysis/phase_diagram.py b/src/pymatgen/analysis/phase_diagram.py index 3c96cb2c572..d3edca38b28 100644 --- a/src/pymatgen/analysis/phase_diagram.py +++ b/src/pymatgen/analysis/phase_diagram.py @@ -2972,7 +2972,7 @@ def _create_plotly_element_annotations(self): for d in ["xref", "yref"]: annotation.pop(d) # Scatter3d cannot contain xref, yref if self._dim == 3: - annotation.update(x=x, y=y) + annotation.update(x=y, y=x) if entry.composition.is_element: z = 0.9 * self._min_energy # place label 10% above base