Skip to content

Fixes a bug in NanoscaleStability.plot_one_stability_map and plot_all_stability_map.#4428

Merged
shyuep merged 6 commits intomaterialsproject:masterfrom
kmu:master
Jun 2, 2025
Merged

Fixes a bug in NanoscaleStability.plot_one_stability_map and plot_all_stability_map.#4428
shyuep merged 6 commits intomaterialsproject:masterfrom
kmu:master

Conversation

@kmu
Copy link
Contributor

@kmu kmu commented Jun 2, 2025

Summary

Major changes:

  • Replaced incorrect ax.xlabel() and ax.ylabel() calls with correct ax.set_xlabel() and ax.set_ylabel().
  • Added ax.legend() to plot_all_stability_map so that labels passed via ax.plot(..., label=...) are displayed.
  • Added test_plot() to test_surface_analysis.py.

Todos

N.A.

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

@kmu kmu requested review from mkhorton and shyuep as code owners June 2, 2025 09:03
@kmu
Copy link
Contributor Author

kmu commented Jun 2, 2025

test_plot
Here is the generated plot by the added test.

@shyuep shyuep enabled auto-merge (squash) June 2, 2025 20:40
@shyuep shyuep merged commit 7c2b99e into materialsproject:master Jun 2, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants