Skip to content

Replace deprecated plot_date with plot#636

Open
m4cd4r4 wants to merge 3 commits intoastropy:mainfrom
m4cd4r4:fix/replace-plot-date
Open

Replace deprecated plot_date with plot#636
m4cd4r4 wants to merge 3 commits intoastropy:mainfrom
m4cd4r4:fix/replace-plot-date

Conversation

@m4cd4r4
Copy link
Copy Markdown

@m4cd4r4 m4cd4r4 commented Mar 10, 2026

Fixes #603.

ax.plot_date() was deprecated in matplotlib 3.9. Replaced with ax.plot() in plot_airmass, plot_altitude, and plot_parallactic. Added ax.xaxis_date() before each formatting block so the axis still uses date-aware locating.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.28%. Comparing base (a4d89a0) to head (52e81b5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #636      +/-   ##
==========================================
+ Coverage   72.90%   76.28%   +3.37%     
==========================================
  Files          14       14              
  Lines        1849     1851       +2     
==========================================
+ Hits         1348     1412      +64     
+ Misses        501      439      -62     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@m4cd4r4
Copy link
Copy Markdown
Author

m4cd4r4 commented Mar 20, 2026

Pushed a fix for the CI and RTD failures. The root cause was fmt being passed as a keyword argument to ax.plot() via style_kwargs, which newer matplotlib no longer accepts - fmt is a positional argument, not a Line2D property.

Changed all style_kwargs.setdefault('fmt', '-') calls to style_kwargs.setdefault('linestyle', '-'), and cleaned up the redundant guard checks that referenced fmt.

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.

Replace deprecated plot_date

1 participant