Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions crystal_toolkit/components/phase_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ def __init__(self, *args, **kwargs) -> None:
# Default plot layouts for Binary (2), Ternary (3), Quaternary (4) phase diagrams
default_binary_plot_style = frozendict(
xaxis={
"title": "Fraction",
"title": {
"text": "Fraction",
"font": {"color": "#000000", "size": 24.0},
},
"anchor": "y",
"mirror": "ticks",
"nticks": 8,
Expand All @@ -45,12 +48,14 @@ def __init__(self, *args, **kwargs) -> None:
"side": "bottom",
"tickfont": {"size": 16.0},
"ticks": "inside",
"titlefont": {"color": "#000000", "size": 24.0},
"type": "linear",
"zeroline": False,
},
yaxis={
"title": "Formation energy (eV/fu)",
"title": {
"text": "Formation energy (eV/fu)",
"font": {"color": "#000000", "size": 24.0},
},
"anchor": "x",
"mirror": "ticks",
"nticks": 7,
Expand All @@ -59,7 +64,6 @@ def __init__(self, *args, **kwargs) -> None:
"side": "left",
"tickfont": {"size": 16.0},
"ticks": "inside",
"titlefont": {"color": "#000000", "size": 24.0},
"type": "linear",
"zeroline": False,
},
Expand Down
26 changes: 14 additions & 12 deletions crystal_toolkit/components/pourbaix.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,26 @@ class PourbaixDiagramComponent(MPComponent):

default_plot_style = frozendict(
xaxis={
"title": "pH",
"title": {
"text": "pH",
"font": {"color": "#000000", "size": 24.0},
},
"anchor": "y",
"mirror": "ticks",
"showgrid": False,
"showline": True,
"side": "bottom",
"tickfont": {"size": 16.0},
"ticks": "inside",
"titlefont": {"color": "#000000", "size": 24.0},
"type": "linear",
"zeroline": False,
"range": [MIN_PH, MAX_PH],
},
yaxis={
"title": "Applied Potential (V vs. SHE)",
"title": {
"text": "Applied Potential (V vs. SHE)",
"font": {"color": "#000000", "size": 24.0},
},
"anchor": "x",
"mirror": "ticks",
"range": [MIN_V, MAX_V],
Expand All @@ -74,7 +79,6 @@ class PourbaixDiagramComponent(MPComponent):
"side": "left",
"tickfont": {"size": 16.0},
"ticks": "inside",
"titlefont": {"color": "#000000", "size": 24.0},
"type": "linear",
"zeroline": False,
},
Expand Down Expand Up @@ -343,8 +347,10 @@ def get_figure(
x=list(ph_range),
y=list(v_range),
colorbar={
"title": "∆G<sub>pbx</sub> (eV/atom)",
"titleside": "right",
"title": {
"text": "∆G<sub>pbx</sub> (eV/atom)",
"side": "right",
},
},
colorscale=[
[0, "#000004"],
Expand Down Expand Up @@ -896,12 +902,8 @@ def make_figure(
filter_solids=kwargs["filter_solids"],
)

self.logger.debug( # noqa: PLE1205
"Generated pourbaix diagram",
len(pourbaix_entries),
heatmap_entry,
conc_dict,
comp_dict,
self.logger.debug(
f"Generated pourbaix diagram with {len(pourbaix_entries)} entries."
)

figure = self.get_figure(
Expand Down
12 changes: 8 additions & 4 deletions crystal_toolkit/components/xas.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ def __init__(self, *args, **kwargs) -> None:

default_xas_layout = frozendict(
xaxis={
"title": "Energy (eV)",
"title": {
"text": "Energy (eV)",
"font": {"size": 16.0},
},
"anchor": "y",
"mirror": "ticks",
"nticks": 8,
Expand All @@ -32,12 +35,14 @@ def __init__(self, *args, **kwargs) -> None:
"side": "bottom",
"tickfont": {"size": 16.0},
"ticks": "inside",
"titlefont": {"size": 16.0},
"type": "linear",
"zeroline": False,
},
yaxis={
"title": "Absorption Coeff, μ (a.u.)",
"title": {
"text": "Absorption Coeff, μ (a.u.)",
"font": {"size": 16.0},
},
"anchor": "x",
"mirror": "ticks",
"nticks": 7,
Expand All @@ -46,7 +51,6 @@ def __init__(self, *args, **kwargs) -> None:
"side": "left",
"tickfont": {"size": 16.0},
"ticks": "inside",
"titlefont": {"size": 16.0},
"type": "linear",
"zeroline": False,
},
Expand Down
Loading