Skip to main content

nc-time-axis

Support for a cftime axis in matplotlib

cirrus-ci Documentation Status codecov pre-commit.ci conda-forge pypi black license contributors

Installation

Install nc-time-axis either with conda:

    conda install -c conda-forge nc-time-axis

Or pip:

    pip install nc-time-axis

Example

import random

import cftime
import matplotlib.pyplot as plt
import nc_time_axis

calendar = "360_day"
dt = [
    cftime.datetime(year=2017, month=2, day=day, calendar=calendar)
    for day in range(1, 31)
]
temperatures = [round(random.uniform(0, 12), 3) for _ in range(len(dt))]

plt.plot(dt, temperatures)
plt.margins(0.1)
plt.ylim(0, 12)
plt.xlabel("Date")
plt.ylabel("Temperature")
plt.show()

alt text

Reference

  • cftime - Time-handling functionality from netcdf4-python.
  • matplotlib - Plotting with Python.

Release files for nc-time-axis 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nc-time-axis 1.4.1
File Size Uploaded
nc-time-axis-1.4.1.tar.gz 66.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nc-time-axis 1.4.1
File Interpreter ABI Platform
nc_time_axis-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 84.0 kB

Release files / nc-time-axis-1.4.1.tar.gz

Download URL nc-time-axis-1.4.1.tar.gz
Size 66.2 kB
Tags Source
SHA-256 checksum
How to use checksums
72d80f492f34bbf59490838d8cb3d92f14e88900b0ee35498b2b33c82795eb81
BLAKE2b-256 checksum
How to use checksums
39c7ceaba2047ef4e08660a5a89a71cea30547bddb0e51236dab2dcb771a6fe1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / nc_time_axis-1.4.1-py3-none-any.whl

Download URL nc_time_axis-1.4.1-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96a6fb28cede0d07998fcd666599f76e51a086e1929fbcbfb758c1d0f3e7b0d1
BLAKE2b-256 checksum
How to use checksums
0189dbeab77a217f8fbda97a637acf1e3f0ce8c9c9fb3f5e5d1ff843da859520
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

1 release file

1.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page