nc-time-axis
Provides support for a cftime axis in matplotlib
What it is and what it does
nc-time-axis is a small integration layer that teaches matplotlib how to handle cftime datetime objects on plot axes. It's designed for scientists and climate modelers who work with data from netCDF files, which often use non-standard calendars that standard Python datetime cannot represent. The package registers cftime objects as a valid matplotlib axis type, so you can pass them directly to plot functions without manual conversion.
The package depends on cftime for calendar handling, matplotlib for plotting, and numpy for array operations. It's actively maintained, supports Python 3.7 and later, and has no known security vulnerabilities. Installation is straightforward via pip or conda, and it requires no system dependencies or configuration.
Use it for:
- Plot climate model output with non-standard calendars directly from netCDF files without converting to standard datetime.
- Create time-series visualizations of weather or oceanographic data that use non-Gregorian calendars.
- Automate axis formatting for scientific publications involving climate or paleoclimate data.
- Build data exploration notebooks for earth science research where cftime objects are native to the data source.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Enables matplotlib to plot data using cftime calendar objects on the x-axis, supporting non-standard calendars used in climate and weather modeling.
Yes. If you work with climate, weather, or earth science data in netCDF format, this package solves a real friction point—plotting cftime objects directly without conversion. It has low install friction, no vulnerabilities, permissive licensing, and active maintenance. If you don't use cftime calendars, it adds no value.
Install
nc-time-axis on PyPI
pip
pip install nc-time-axisuv
uv add nc-time-axispoetry
poetry add nc-time-axisInstalling nc-time-axis
Before you install
Low friction installation as a pure Python wheel. Actively maintained with recent commits; last release was in 2022 but repository remains active with ongoing development.
License in practice
BSD 3-Clause permissive license allows use in commercial and private projects with minimal restrictions beyond attribution.
Quickstart
pip install nc-time-axis
import cftime
import matplotlib.pyplot as plt
import nc_time_axis
dt = [cftime.datetime(2017, 2, day, calendar="360_day") for day in range(1, 31)]
plt.plot(dt, [1, 2, 3]) # cftime objects now work on x-axis
plt.show()
Verify before relying
- Whether the package handles all cftime calendar types or only a subset of the calendars supported by cftime itself.
- Performance characteristics when plotting large datasets with non-standard calendars.
- Support for calendar types beyond 360-day calendars.
Package facts
| License | BSD 3-Clause (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — cftime, matplotlib, numpy |
| Maintenance | actively maintained — 1,577 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 184,419/month — #10,038 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nc_time_axis-1.4.1-py3-none-any.whl
Keywords: axis, cftime, matplotlib
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
cftimeConverts between calendar dates and numeric…
permissive · top 5,000 on PyPI
timpleTimple extends Matplotlib with locators and…
permissive · top 15,000 on PyPI
cmweathercmweather provides a collection of colormaps…
permissive · top 15,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
fiscalyearProvides fiscal year, quarter, month, and day…
permissive · top 15,000 on PyPI
cf-unitscf-units provides units of measure as defined…
permissive · top 15,000 on PyPI
tkcalendarProvides Calendar and DateEntry widgets for…
copyleft · top 15,000 on PyPI
x-wr-timezoneConverts ICS calendar files that use the…
copyleft · top 5,000 on PyPI
workadaysCalculates working days, calendar days, and…
permissive · top 15,000 on PyPI
convertdateConverts dates between the Gregorian calendar…
permissive · top 5,000 on PyPI