Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
82ca9c9
Fix messed up numerbing mixing plots for examples 19*
sadielbartholomew Nov 6, 2026
3ee09b3
Revert example and test back to field selection unpack
sadielbartholomew Nov 6, 2026
bfcec63
Remove bad '.array' calls in example 23a & ref correct plot
sadielbartholomew Nov 6, 2026
a02b67d
Sort UKCP-related test methods setup
sadielbartholomew Nov 6, 2026
aa063ee
Sort docs out-of-sync mapping to example snippet images
sadielbartholomew Nov 6, 2026
a60e3ce
Add final missing plot reference images
sadielbartholomew Nov 6, 2026
6d82348
Correct two image links on docs examples gallery grid
sadielbartholomew Nov 9, 2026
3538de5
Add missing API reference page for cfp.plotvars
sadielbartholomew Nov 9, 2026
0469c4f
Add missing docstring description hence API summary for cfp.reset
sadielbartholomew Nov 9, 2026
1a6ed5c
Add objects missing from public API post-refactor at v3.5.0
sadielbartholomew Nov 9, 2026
477310d
Add final objects missing from public API post-refactor at v3.5.0
sadielbartholomew Nov 9, 2026
30139a3
Update '__all__' slots to include missing public API objects
sadielbartholomew Nov 10, 2026
04f3a9a
Improve docstring description lines for API reference
sadielbartholomew Nov 10, 2026
e40684f
Fix formatting of example in gfigure case Google-style docstring
sadielbartholomew Nov 10, 2026
a3497b1
Update Docs Versions page and Changelog for 3.5+ releases
sadielbartholomew Nov 10, 2026
1868204
Change name of Docs 'versions' page to 'releases & changes'
sadielbartholomew Nov 10, 2026
3d37ad7
Extract library version from packaging for docs config.
sadielbartholomew Nov 10, 2026
ed58b46
Remove obsolete internal utility functions from docs etc.
sadielbartholomew Nov 10, 2026
55a3b3f
Remove obsolete internal utility functions from __all__ slots
sadielbartholomew Nov 10, 2026
735b63d
Update packaging dependencies & authors/maintainers
sadielbartholomew Nov 10, 2026
ccc1c13
Note newly obsolete internal functions in API Reference
sadielbartholomew Nov 10, 2026
f3d05a2
Some fixes with tests that are failing
sadielbartholomew Nov 10, 2026
9c5029c
Update prev-missing Example 31 test for setvars fix
sadielbartholomew Nov 10, 2026
6c9c10a
Fix grid drawing via xticks-yticks to contour as per Example 32
sadielbartholomew Nov 10, 2026
0881c2b
Add #166 grid xticks/yticks fix to changelog & re-order for release
sadielbartholomew Nov 10, 2026
98f8828
Create pytest xfail decorator to mark only in image comparison case
sadielbartholomew Nov 10, 2026
2b96949
Lint with black and isort
sadielbartholomew Nov 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 102 additions & 36 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## cf-plot changelog

**Current release: version `3.5.0`, released `2026-10-09`**
**Current release: version `3.6.0`, released `2026-11-10`**

*Note*: stated dates of releases correspond to the date a given
version was tagged on GitHub. Up until 2024 some detail may
Expand All @@ -14,10 +14,18 @@ of being developed elsewhere.
-----


### Version `3.5.X`, first released XXXXXX
### Version `3.6`

#### Version `3.5.1`, released 2026-??-??
First released (`3.6.0`) `2026-11-10`

#### Version `3.6.0`, released 2026-11-10

* New function `gfigure` for use as context manager `with cfp.figure():`
to make multiple plot calls without need to call `gopen` then `gclose`
(https://github.com/NCAS-CMS/cf-plot/issues/159)
* Clarify scatter plot support including new function `scatter` to call
`lineplot` with `lines=False` and markers on plus new example (27b)
(https://github.com/NCAS-CMS/cf-plot/issues/160)
* Update code to prevent deprecation-related warnings
(https://github.com/NCAS-CMS/cf-plot/issues/72)
* Prevent striped artefacts on curvilinear longitude/latitude grids
Expand All @@ -34,13 +42,17 @@ of being developed elsewhere.
(https://github.com/NCAS-CMS/cf-plot/issues/150)
* Fix bug whereby `gclose` showed no view after `gopen` call with
`file` set (https://github.com/NCAS-CMS/cf-plot/issues/53)
* New function `gfigure` for use as context manager `with cfp.figure():`
to make multiple plot calls without need to call `gopen` then `gclose`
(https://github.com/NCAS-CMS/cf-plot/issues/159)
* Clarify scatter plot support including new function `scatter` to call
`lineplot` with `lines=False` and markers on plus new example (27b)
(https://github.com/NCAS-CMS/cf-plot/issues/160)
* Fix bug preventing grid layer appearing with `xticks` and/or `yticks`
specification for custom lon/lat spacing, as per Example 32
(https://github.com/NCAS-CMS/cf-plot/issues/166)
* Remove some obsolete internal-use routines that were previously exposed
in the public API: `map_grid`, `find_pos_in_array`, `irregular_window`,
`max_ndecs_data`, `pcon`, `vloc`


### Version `3.5`

First released (`3.5.0`) `2026-10-09`

#### Version `3.5.0`, released 2026-10-09

Expand Down Expand Up @@ -77,7 +89,9 @@ of being developed elsewhere.
(https://github.com/NCAS-CMS/cf-plot/issues/114)


### Version `3.4.X`, first released (`3.4.0`) `2025-04-28`
### Version `3.4`

First released (`3.4.0`) `2025-04-28`

#### Version `3.4.0`, released `2025-04-28`

Expand Down Expand Up @@ -128,135 +142,187 @@ of being developed elsewhere.
dependency cf-python


### Version `3.3.X`, first released (`3.3.0`) `2024-01-15`
### Version `3.3`

First released (`3.3.0`) `2024-01-15`

#### Version `3.3.0`, released `2024-01-15`

* UGRID support added


### Version `3.2.X`, first released (`3.2.0`) `2023-03-06`
### Version `3.2`

First released (`3.2.0`) `2023-03-06`

* Rolling bug fix versions


### Version `3.1.X`, first released (`3.1.0`) `2021-04-13`
### Version `3.1`

First released (`3.1.0`) `2021-04-13`

* UGRID support


### Version `3.0.X`, first released (`3.0.2`) `2019-09-23`
### Version `3.0`

First released (`3.0.2`) `2019-09-23`

* Port to Python 3 and Mac OSX


### Version `2.4.X`, first released (`2.4.1`) `2019-04-01`
### Version `2.4`

First released (`2.4.1`) `2019-04-01`

* Trajectories


### Version `2.3.X` first released (`2.3.1`) `2019-03-07`
### Version `2.3`

First released (`2.3.1`) `2019-03-07`

* Support for the UKCP grid


### Version `2.2.X`, first released (`2.2.18`) `2019-01-30`
### Version `2.2`

First released (`2.2.18`) `2019-01-30`

* Change from Basemap to Cartopy mapping


### Version `2.1.X`, first released (`2.1.10`) `2017-01-23`
### Version `2.1`

First released (`2.1.10`) `2017-01-23`

* Rolling set of small additions and bug fixes


### Version `2.0.X`, first released (?) (date unknown)
### Version `2.0`

First released (?) (date unknown)

* Code base changes


### Version `1.9.X`, first released (`1.9.1`) `2016-01-04`
### Version `1.9`

First released (`1.9.1`) `2016-01-04`

* Rolling update of features


### Version `1.8.X`, first released (`1.8.1`) `2015-12-21`
### Version `1.8`

First released (`1.8.1`) `2015-12-21`

* Graph plots


### Version `1.7.X`, first released (`1.7.3`) `2015-03-19`
### Version `1.7`

First released (`1.7.3`) `2015-03-19`

* Rolling update of features


### Version `1.6`, first released (?) (date unknown)
### Version `1.6`

First released (?) (date unknown)

* Rotated pole plots


### Version `1.5`, first released (?) (date unknown)
### Version `1.5`

First released (?) (date unknown)

* Bug/feature fix


### Version `1.4`, first released (?) (date unknown)
### Version `1.4`

First released (?) (date unknown)

* PDF user guide


### Version `1.3.X`, first released (?) (date unknown)
### Version `1.3`

First released (?) (date unknown)

* Bug/feature fix


### Version `1.2`, first released (?) (date unknown)
### Version `1.2`

First released (?) (date unknown)

* Hovmoller plots


### Version `1.1`, first released (?) (date unknown)
### Version `1.1`

First released (?) (date unknown)

* Error handling


### Version `1.0`, first released (?) (date unknown)
### Version `1.0`

First released (?) (date unknown)

* Data interface improvements


### Version `0.9`, first released (?) (date unknown)
### Version `0.9`

First released (?) (date unknown)

* `vect` for vector plotting


### Version `0.8`, first released (?) (date unknown)
### Version `0.8`

First released (?) (date unknown)

* `stipple` for significance plots


### Version `0.7`, first released (?) (date unknown)
### Version `0.7`

First released (?) (date unknown)

* `cscale` for colour scales


### Version `0.6`, first released (?) (date unknown)
### Version `0.6`

First released (?) (date unknown)

* `gopen`, `gclose`, `gpos` opening and closing of output files/plot
positioning


### Version `0.5`, first released (?) (date unknown)
### Version `0.5`

First released (?) (date unknown)

* latitude-height plots


### Version `0.4`, first released (?) (date unknown)
### Version `0.4`

First released (?) (date unknown)

* `gset`, `axes` for setting plot limits and plotting axes


### Version `0.3`, released `2012-12-10`
### Version `0.3`

Released `2012-12-10`

* Initial release (first version on GitHub).

Expand Down
42 changes: 37 additions & 5 deletions cfplot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,29 @@
from .colorbar import cbar
from .colour import cscale
from .contour import con, levs
from .layout_runtime import gclose, gopen, gpos, gset, gfigure
from .layout_runtime import axes, gclose, gfigure, gopen, gpos, gset
from .line import lineplot, scatter
from .map_runtime import mapset
from .rotated_runtime import _render_rotated_grid_axes
from .state import plotvars, reset_runtime_state, setvars
from .stipple import stipple
from .stream import stream
from .trajectory import traj
from .utility import (
add_cyclic,
calculate_levels,
cf_var_name,
cf_var_name_titles,
find_dim_names,
find_z,
fix_floats,
generate_titles,
)
from .utility import gvals as _gvals_impl
from .utility import mapaxis as _mapaxis_impl
from .utility import regrid
from .vector import vect
from .utility import ndecs, polar_regular_grid, regrid, stipple_points
from .validate import check_well_formed, orca_check
from .vector import axes_plot, vect

__author__ = "Andy Heaps, Sadie Bartholomew, Bryan Lawrence"
__maintainer__ = "Sadie Bartholomew"
Expand Down Expand Up @@ -67,6 +78,7 @@ def _resolve_version():


def reset():
"""Reset plotting state to the default configuration."""
gset()
cscale()
levs()
Expand All @@ -76,6 +88,7 @@ def reset():


def _gvals(*args, **kwargs):
"""Work out a sensible set of values between two limits."""
return _gvals_impl(*args, **kwargs)


Expand All @@ -95,6 +108,7 @@ def rgaxes(
xlabel=None,
ylabel=None,
):
"""Label rotated grid plots."""
return _render_rotated_grid_axes(
xpole=xpole,
ypole=ypole,
Expand All @@ -113,6 +127,7 @@ def rgaxes(


def _mapaxis(min=None, max=None, type=None):
"""Work out a sensible set of lon-lat tick marks and labels."""
return _mapaxis_impl(
min_val=min,
max_val=max,
Expand All @@ -122,25 +137,42 @@ def _mapaxis(min=None, max=None, type=None):


__all__ = [
"_gvals", # Req'd for public API?
"_mapaxis", # Req'd for public API?
"add_cyclic",
"axes",
"axes_plot",
"calculate_levels",
"cbar",
"cf_var_name",
"cf_var_name_titles",
"check_well_formed",
"con",
"cscale",
"find_dim_names",
"find_z",
"fix_floats",
"gclose",
"generate_titles",
"gfigure",
"gopen",
"gpos",
"gset",
"levs",
"lineplot",
"mapset",
"ndecs",
"orca_check",
"plotvars",
"polar_regular_grid",
"regrid",
"reset",
"rgaxes",
"scatter",
"setvars",
"stipple",
"stipple_points",
"stream",
"traj",
"vect",
"_gvals",
"_mapaxis",
]
Loading