Climate contour, vector and line plots in Python
Project description
cf-plot
Code-light plotting for earth science and aligned research
Overview
cf-plot allows you to produce and customise publication-quality contour, vector, line and more plots with the power of Python, matplotlib, Cartopy and cf-python, in as few lines of code as possible.
It is designed to be a useful visualisation tool for environmental, earth and aligned sciences, for example to facilitate climate and meteorological research. cf-plot is developed and maintained by the NCAS-CMS group, part of NCAS.
Brief Demonstration
In as little as four lines of Python including imports and file reading,
using cf-plot
you can for example produce a contour plot showing a 2D
subspace of a netCDF dataset:
import cf
import cfplot as cfp
f = cf.read('<dataset name>.nc')[0] # picks out a read-in field of the dataset
cfp.con(f.subspace(time=<chosen time value>)) # creates a contour plot of the field at that time value
Examples Gallery
A gallery of outputs made with cf-plot, showcasing a range of plotting possibilities with links to relevant documentation pages and to example code, can be found on this dedicated page within the documentation, as illustrated in the (static) image at the top of this document.
Documentation
See the cf-plot homepage
(https://ncas-cms.github.io/cf-plot
) for the full online documentation.
Installation
To install cf-plot with its required dependencies, you can use pip
:
pip install cf-python cf-plot
or you can use conda
(or similar package managers such
as mamba
) as follows (or equivalent):
conda install -c ncas -c conda-forge cf-python cf-plot udunits2
More detail about installation is provided on the
installation page
(https://ncas-cms.github.io/cf-plot/installation.html
)
of the documentation.
Contributing
Everyone is welcome to contribute to cf-plot in the form of bug reports, documentation, code, design proposals, and more.
Contributing guidelines will be added to the repository shortly.
Help: Issues, Questions, Feature Requests, etc.
For any queries, see the
guidance page
(https://ncas-cms.github.io/cf-plot/support.html
).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file cf_plot-3.4.0.tar.gz
.
File metadata
- Download URL: cf_plot-3.4.0.tar.gz
- Upload date:
- Size: 48.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
aa86a09c22ee5d5e5b0949735208a38441848d3fe6e800b48e592bd52fe7d781
|
|
MD5 |
2d58e30e4b73b6aeeed0c639e6667257
|
|
BLAKE2b-256 |
337a52d2064c1feda45799d9ed92db6d7af858f30ed500c1c028e2b41bceb08a
|