Socket
Socket
Sign inDemoInstall

nc-time-axis

Package Overview
Dependencies
11
Maintainers
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nc-time-axis

Provides support for a cftime axis in matplotlib


Maintainers
8

Readme

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.

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc