diff --git a/crystal_toolkit/components/phase_diagram.py b/crystal_toolkit/components/phase_diagram.py index c48204d0..538ce465 100644 --- a/crystal_toolkit/components/phase_diagram.py +++ b/crystal_toolkit/components/phase_diagram.py @@ -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, @@ -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, @@ -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, }, diff --git a/crystal_toolkit/components/pourbaix.py b/crystal_toolkit/components/pourbaix.py index 64cc652f..7fcf31d0 100644 --- a/crystal_toolkit/components/pourbaix.py +++ b/crystal_toolkit/components/pourbaix.py @@ -51,7 +51,10 @@ 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, @@ -59,13 +62,15 @@ class PourbaixDiagramComponent(MPComponent): "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], @@ -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, }, @@ -343,8 +347,10 @@ def get_figure( x=list(ph_range), y=list(v_range), colorbar={ - "title": "∆Gpbx (eV/atom)", - "titleside": "right", + "title": { + "text": "∆Gpbx (eV/atom)", + "side": "right", + }, }, colorscale=[ [0, "#000004"], @@ -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( diff --git a/crystal_toolkit/components/xas.py b/crystal_toolkit/components/xas.py index 42b125f2..d68dfbba 100644 --- a/crystal_toolkit/components/xas.py +++ b/crystal_toolkit/components/xas.py @@ -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, @@ -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, @@ -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, },