Updating Ternary and Quaternary Plots #3948
Conversation
Adds marker labels to 3D ternary plots Adds additional spacing to 2D and 3D hovertext so it is easier to read. Signed-off-by: JoshuaNgXY <jxng@lbl.gov>
Signed-off-by: JoshuaNgXY <jxng@lbl.gov>
Variable name update Signed-off-by: JoshuaNgXY <jxng@lbl.gov>
Updated hovertext to specify "Formation energy" and "Energy above hull". Updated Quaternary plot to have labels for atomic concentration of elements. Added a label to quaternary plot which allows users to toggle the hull surfaces so that the inner points can be accessed. Signed-off-by: JoshuaNgXY <jxng@lbl.gov>
Head branch was pushed to by a user without write access
Small variable name change to fix pre-commit Signed-off-by: JoshuaNgXY <jxng@lbl.gov>
|
Thanks for this PR @JoshuaNgXY! Since it deals with plotting can you add some screenshots? |
|
@JoshuaNgXY is working with MP to update the PD plotting functionality. If you think it's good to go then we can then update the dependencies. Thank you @mkhorton @janosh ! |
e3fbc67 to
41e6d99
Compare
Added labels for the x value to points on the voltage graph so they are easier to read. Signed-off-by: JoshuaNgXY <joshuang@g.ucla.edu>
Update Voltage Graph
There was a problem hiding this comment.
Reformatting the Battery hovertext to include more information about the x-axis.
| color=next(fillcolors), | ||
| legendgroup="facets", | ||
| ) | ||
| ] |
There was a problem hiding this comment.
Adding the legendgroup to the facets of the quaternary graph. The first facet is used as the entry to the legend and defines the name which appears in the legend.
| if e_above_hull > self.show_unstable: | ||
| continue | ||
| label += f" ({e_above_hull:+} eV/atom)" | ||
| label += f" Energy Above Hull: ({e_above_hull:+} eV/atom)" |
There was a problem hiding this comment.
Alongside 3008, small format change
| label += "<br>" | ||
| total_sum_el = sum(entry.composition[el] for el, _axis in zip(self._pd.elements, range(self._dim))) | ||
| for el, _axis in zip(self._pd.elements, range(self._dim)): | ||
| label += f"<br> {el}: {round(entry.composition[el]/total_sum_el, 6)}" |
There was a problem hiding this comment.
Updating Ternary hovertext
| label += "<br>" | ||
| total_sum_el = sum(entry.composition[el] for el, _axis in zip(self._pd.elements, range(self._dim))) | ||
| for el, _axis in zip(self._pd.elements, range(self._dim)): | ||
| label += f"<br> {el}: {round(entry.composition[el]/total_sum_el, 6)}" |
There was a problem hiding this comment.
Updating Quaternary Hovertext
Trying to fix tests Signed-off-by: JoshuaNgXY <joshuang@g.ucla.edu>
Barebones fix to pass tests Signed-off-by: JoshuaNgXY <joshuang@g.ucla.edu>






Summary
The atomic concentrations of each material in the ternary graph are added to the 2D and 3D ternary graphs for readability. A toggle is added to the quaternary graph hull surfaces.
Extra labels added to hovertext of the Voltage graph for readability.
Adding atomic concentrations:
get_marker_props()for both the ternary and quaternary graphs.Adding Toggle to Quaternary Graph Hull Surfaces:
facets. The first 3D Mesh object is used to display the whole group in the legend, and is renamed toHull Surfaces (toggle to access points easier).