ncplot 0.3.13__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {ncplot-0.3.13 → ncplot-0.4.1}/PKG-INFO +11 -5
  2. {ncplot-0.3.13 → ncplot-0.4.1}/README.md +10 -4
  3. ncplot-0.3.13/ncplot/deprecated.py → ncplot-0.4.1/docs-site/.nojekyll +0 -0
  4. ncplot-0.4.1/docs-site/README.md +105 -0
  5. ncplot-0.4.1/docs-site/about.html +142 -0
  6. ncplot-0.4.1/docs-site/api.html +175 -0
  7. ncplot-0.4.1/docs-site/archive/versions.json +1 -0
  8. ncplot-0.4.1/docs-site/assets/css/style.css +926 -0
  9. ncplot-0.4.1/docs-site/assets/img/favicon.svg +15 -0
  10. ncplot-0.4.1/docs-site/assets/img/ncplot_wordmark.svg +4 -0
  11. ncplot-0.4.1/docs-site/assets/img/pml_logo.jpg +0 -0
  12. ncplot-0.4.1/docs-site/assets/js/main.js +105 -0
  13. ncplot-0.4.1/docs-site/example/plot.html +68 -0
  14. ncplot-0.4.1/docs-site/index.html +311 -0
  15. ncplot-0.4.1/docs-site/installing.html +164 -0
  16. ncplot-0.4.1/docs-site/quickstart.html +175 -0
  17. ncplot-0.4.1/docs-site/version-history.html +108 -0
  18. ncplot-0.4.1/ncplot/deprecated.py +0 -0
  19. {ncplot-0.3.13 → ncplot-0.4.1}/ncplot/plot.py +182 -4
  20. ncplot-0.4.1/ncplot.egg-info/SOURCES.txt +27 -0
  21. {ncplot-0.3.13 → ncplot-0.4.1}/setup.py +1 -1
  22. ncplot-0.3.13/ncplot.egg-info/SOURCES.txt +0 -12
  23. {ncplot-0.3.13 → ncplot-0.4.1}/LICENSE +0 -0
  24. {ncplot-0.3.13 → ncplot-0.4.1}/MANIFEST.in +0 -0
  25. {ncplot-0.3.13 → ncplot-0.4.1}/ncplot/__init__.py +0 -0
  26. {ncplot-0.3.13 → ncplot-0.4.1}/ncplot/command_line.py +0 -0
  27. {ncplot-0.3.13 → ncplot-0.4.1}/ncplot/utils.py +0 -0
  28. {ncplot-0.3.13 → ncplot-0.4.1}/ncplot/xarray.py +0 -0
  29. {ncplot-0.3.13 → ncplot-0.4.1}/pyproject.toml +0 -0
  30. {ncplot-0.3.13 → ncplot-0.4.1}/requirements.txt +0 -0
  31. {ncplot-0.3.13 → ncplot-0.4.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ncplot
3
- Version: 0.3.13
3
+ Version: 0.4.1
4
4
  Summary: Interactive viewing of NetCDF data
5
5
  Home-page: https://github.com/pmlmodelling/ncplot
6
6
  Author: Robert Wilson
@@ -46,15 +46,21 @@ Dynamic: requires-python
46
46
  Dynamic: summary
47
47
 
48
48
 
49
+ <p align="center">
50
+ <img src="docs-site/assets/img/ncplot_wordmark.svg" alt="NCPlot" width="380">
51
+ </p>
49
52
 
50
- # ncplot - Easy interactive viewing of NetCDF files in Python
51
-
52
-
53
+ > [!TIP]
54
+ > 📖 **New here?** The NCPlot website — installing, a quickstart, the API reference, and more — lives at **[pmlmodelling.github.io/ncplot](https://pmlmodelling.github.io/ncplot/)**.
53
55
 
54
56
  [![pypi](https://img.shields.io/pypi/v/ncplot.svg)](https://pypi.python.org/pypi/ncplot/)
55
57
  [![Documentation Status](https://readthedocs.org/projects/ncplot/badge/?version=latest)](https://ncplot.readthedocs.io/en/latest/?badge=latest)
56
58
 
57
59
 
60
+ # NCPlot
61
+
62
+ Easy interactive viewing of NetCDF files in Python.
63
+
58
64
  An easy to use Python (3.6 and above) package for quickly plotting the contents of NetCDF files or xarray datasets in Python or on the command line.
59
65
 
60
66
  This package is designed to work with [CF](https://cfconventions.org/) compliant NetCDF data.
@@ -144,7 +150,7 @@ ncplot example.nc
144
150
 
145
151
  # Reference and tutorials
146
152
 
147
- A full API reference, and a how-to guide are available at [readthedocs](https://ncplot.readthedocs.io/en/latest/).
153
+ A full API reference, and a how-to guide are available at the [NCPlot website](https://pmlmodelling.github.io/ncplot/) and on [readthedocs](https://ncplot.readthedocs.io/en/latest/).
148
154
 
149
155
 
150
156
 
@@ -1,12 +1,18 @@
1
+ <p align="center">
2
+ <img src="docs-site/assets/img/ncplot_wordmark.svg" alt="NCPlot" width="380">
3
+ </p>
1
4
 
2
- # ncplot - Easy interactive viewing of NetCDF files in Python
3
-
4
-
5
+ > [!TIP]
6
+ > 📖 **New here?** The NCPlot website — installing, a quickstart, the API reference, and more — lives at **[pmlmodelling.github.io/ncplot](https://pmlmodelling.github.io/ncplot/)**.
5
7
 
6
8
  [![pypi](https://img.shields.io/pypi/v/ncplot.svg)](https://pypi.python.org/pypi/ncplot/)
7
9
  [![Documentation Status](https://readthedocs.org/projects/ncplot/badge/?version=latest)](https://ncplot.readthedocs.io/en/latest/?badge=latest)
8
10
 
9
11
 
12
+ # NCPlot
13
+
14
+ Easy interactive viewing of NetCDF files in Python.
15
+
10
16
  An easy to use Python (3.6 and above) package for quickly plotting the contents of NetCDF files or xarray datasets in Python or on the command line.
11
17
 
12
18
  This package is designed to work with [CF](https://cfconventions.org/) compliant NetCDF data.
@@ -96,7 +102,7 @@ ncplot example.nc
96
102
 
97
103
  # Reference and tutorials
98
104
 
99
- A full API reference, and a how-to guide are available at [readthedocs](https://ncplot.readthedocs.io/en/latest/).
105
+ A full API reference, and a how-to guide are available at the [NCPlot website](https://pmlmodelling.github.io/ncplot/) and on [readthedocs](https://ncplot.readthedocs.io/en/latest/).
100
106
 
101
107
 
102
108
 
@@ -0,0 +1,105 @@
1
+ # NCPlot website
2
+
3
+ Source for the NCPlot marketing/documentation site (`docs-site/` in the main
4
+ ncplot repository). Plain static HTML/CSS/JS — no build step, no dependencies.
5
+
6
+ ## Structure
7
+
8
+ ```
9
+ index.html Landing page
10
+ installing.html \
11
+ quickstart.html Documentation, mirrors docs/source/*.rst in the
12
+ api.html ncplot package, redesigned
13
+ about.html /
14
+ version-history.html Links to archive/vX.Y.Z/ snapshots - see "Archived
15
+ versions" below
16
+ assets/
17
+ css/style.css Design system (design tokens, components)
18
+ js/main.js Nav, copy-to-clipboard, scrollspy, version badge
19
+ img/ Logo (ncplot_wordmark.svg), PML logo, favicon
20
+ archive/ Per-release snapshots of just index.html + api.html
21
+ (nav simplified to a single Version history link) +
22
+ assets/, written by .github/workflows/docs-archive.yml.
23
+ Don't hand-edit it.
24
+ ```
25
+
26
+ ## Previewing locally
27
+
28
+ ```sh
29
+ cd docs-site
30
+ python3 -m http.server 8000
31
+ # then open http://localhost:8000
32
+ ```
33
+
34
+ ## Deploying to GitHub Pages
35
+
36
+ Deployment is automated by `.github/workflows/pages.yml` (at the repository
37
+ root, not under `docs-site/`), which publishes this directory as-is (no build
38
+ step) whenever a push to `master` touches `docs-site/**`.
39
+
40
+ To turn it on:
41
+
42
+ 1. In the repo's **Settings → Pages**, set **Source** to **GitHub Actions**
43
+ (not "Deploy from a branch").
44
+ 2. Push to `master` (or run the workflow manually from the **Actions** tab —
45
+ it has `workflow_dispatch` enabled). The site publishes to
46
+ `https://pmlmodelling.github.io/ncplot/`.
47
+
48
+ If the default branch changes, update the `branches:` list in the workflow
49
+ file to match.
50
+
51
+ The included `.nojekyll` file stops GitHub Pages from running its default
52
+ Jekyll processing, which isn't needed here and can interfere with files/paths
53
+ starting with an underscore.
54
+
55
+ ## Version badge
56
+
57
+ Every page shows the latest NCPlot release next to the header logo
58
+ (`<span id="ncplot-docs-version" class="brand-version">`). It's entirely
59
+ client-side: `assets/js/main.js` fetches `https://pypi.org/pypi/ncplot/json`
60
+ on page load and fills in the placeholder `v&hellip;` with the current
61
+ version. Don't hardcode a version number here — it needs that literal
62
+ placeholder text to find and replace.
63
+
64
+ ## Archived versions
65
+
66
+ `.github/workflows/docs-archive.yml` runs whenever a GitHub Release is
67
+ created. It reads the version from `setup.py` (the source of truth - not the
68
+ release's tag name, not PyPI, since PyPI's publish can race this workflow),
69
+ and copies only `api.html` and `assets/` into `archive/vX.Y.Z/` — the other
70
+ pages (`index.html`, `installing.html`, `quickstart.html`, `about.html`)
71
+ aren't meaningfully version-specific, and archiving every page of every
72
+ release indefinitely doesn't scale. Within the snapshot, the nav on `api.html`
73
+ is simplified down to a single "Version history" link, and any link to one of
74
+ the un-archived pages (plus `version-history.html` itself, which isn't
75
+ version-specific either) is rewritten to point at the live copy instead of
76
+ 404ing inside the snapshot. It also freezes the header badge in the snapshot
77
+ to a plain "vX.Y.Z (archived)" span - it must never update again, unlike the
78
+ live badge. It then updates `archive/versions.json` (newest first) and
79
+ rewrites the list between the
80
+ `<!-- NCPLOT_VERSION_HISTORY_START -->` / `<!-- NCPLOT_VERSION_HISTORY_END -->`
81
+ markers in `version-history.html` to match, linking each version straight
82
+ to its archived `api.html`. Finally it commits and pushes that to `master`
83
+ and explicitly dispatches `pages.yml` (a `GITHUB_TOKEN` push doesn't trigger
84
+ other workflows on its own, so this can't just rely on the normal push
85
+ trigger).
86
+
87
+ Existing snapshots are never touched by a later release - only a brand new
88
+ `archive/vX.Y.Z/` directory gets created each time. If that directory already
89
+ exists (e.g. the workflow re-ran for some reason), it's left alone rather
90
+ than overwritten.
91
+
92
+ `version-history.html` itself is a normal hand-authored page (same header,
93
+ nav, and footer as the rest of the site — keep it in sync with the other
94
+ pages if you change shared markup) with one auto-generated block in the
95
+ middle. Don't hand-edit between its markers; everything else on the page is
96
+ yours to edit like any other.
97
+
98
+ ## Updating content
99
+
100
+ Page content is authored by hand to match the current ncplot docs
101
+ (`docs/source/*.rst` and the package README) — there's no templating engine,
102
+ so if the underlying package docs change, update the corresponding `.html`
103
+ file(s) directly. Shared header/nav/footer markup is duplicated across pages
104
+ (no static-site generator), so a nav or footer change should be applied to
105
+ all six `.html` files.
@@ -0,0 +1,142 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>About — NCPlot</title>
7
+ <meta name="description" content="NCPlot is developed by Robert Wilson at Plymouth Marine Laboratory. Bug reports, contributions and feature requests are welcome on GitHub.">
8
+ <link rel="icon" type="image/svg+xml" href="assets/img/favicon.svg">
9
+ <link rel="preconnect" href="https://fonts.googleapis.com">
10
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
12
+ <link rel="stylesheet" href="assets/css/style.css">
13
+ </head>
14
+ <body>
15
+
16
+ <header class="site-header">
17
+ <div class="container nav">
18
+ <a class="brand" href="index.html">
19
+ <img src="assets/img/ncplot_wordmark.svg" alt="NCPlot">
20
+ <span id="ncplot-docs-version" class="brand-version">v&hellip;</span>
21
+ </a>
22
+ <nav class="nav-links" id="nav-links">
23
+ <a href="installing.html" data-page="installing.html">Install</a>
24
+ <a href="quickstart.html" data-page="quickstart.html">Quickstart</a>
25
+ <a href="api.html" data-page="api.html">API</a>
26
+ <a href="about.html" data-page="about.html">About</a>
27
+ <a href="version-history.html" data-page="version-history.html">Version history</a>
28
+ </nav>
29
+ <div class="nav-actions">
30
+ <a class="icon-btn" href="https://github.com/pmlmodelling/ncplot" target="_blank" rel="noopener" aria-label="NCPlot on GitHub">
31
+ <svg viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 .5C5.73.5.5 5.74.5 12.09c0 5.08 3.29 9.38 7.86 10.9.57.1.79-.25.79-.55 0-.27-.01-1.17-.02-2.12-3.2.7-3.88-1.36-3.88-1.36-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.17.08 1.78 1.2 1.78 1.2 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.56-.29-5.26-1.28-5.26-5.71 0-1.26.45-2.29 1.19-3.09-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11.1 11.1 0 0 1 5.79 0c2.2-1.49 3.17-1.18 3.17-1.18.64 1.59.24 2.76.12 3.05.74.8 1.18 1.83 1.18 3.09 0 4.44-2.7 5.42-5.28 5.7.42.36.78 1.08.78 2.17 0 1.57-.01 2.83-.01 3.22 0 .3.21.66.8.55A10.6 10.6 0 0 0 23.5 12.1C23.5 5.74 18.27.5 12 .5Z"/></svg>
32
+ </a>
33
+ <button class="nav-toggle" id="nav-toggle" aria-label="Toggle menu" aria-expanded="false">
34
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
35
+ </button>
36
+ </div>
37
+ </div>
38
+ </header>
39
+
40
+ <div class="page-hero">
41
+ <div class="container">
42
+ <div class="breadcrumb"><a href="index.html">Home</a> / About</div>
43
+ <h1>About NCPlot</h1>
44
+ </div>
45
+ </div>
46
+
47
+ <div class="section section-tight">
48
+ <div class="container">
49
+ <div class="two-col">
50
+ <div class="info-card">
51
+ <h3><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>Bugs and issues</h3>
52
+ <p>If you identify bugs or issues with the package, please raise an issue on the <a href="https://github.com/pmlmodelling/ncplot/issues" target="_blank" rel="noopener">NCPlot GitHub page</a>, or contact the package's creator, Robert Wilson, at <a href="mailto:rwi@pml.ac.uk">rwi@pml.ac.uk</a>.</p>
53
+ </div>
54
+ <div class="info-card">
55
+ <h3><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>Contributions welcome</h3>
56
+ <p>NCPlot should handle most types of netCDF file, but there will still be times when errors are thrown. If you would like to contribute, suggest new features, or point to data the package does not work with, please raise an issue or get in touch directly.</p>
57
+ </div>
58
+ <div class="info-card">
59
+ <h3><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>License</h3>
60
+ <p>NCPlot is released under the GNU General Public License v3 (GPLv3), and distributed via conda-forge, PyPI and GitHub.</p>
61
+ </div>
62
+ <div class="info-card" style="display:flex; align-items:center; gap:1rem;">
63
+ <img src="assets/img/pml_logo.jpg" alt="Plymouth Marine Laboratory" style="height:40px; width:auto; flex-shrink:0;">
64
+ <span>NCPlot was created by Robert Wilson at the <a href="https://pml.ac.uk/sciencetopics/environmental-intelligence/" target="_blank" rel="noopener">Environmental Intelligence group</a>, <a href="https://pml.ac.uk/" target="_blank" rel="noopener">Plymouth Marine Laboratory</a>, Devon, UK.</span>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+
70
+ <div class="section section-tight section-alt">
71
+ <div class="container" style="max-width: 760px;">
72
+ <h2>Dependencies</h2>
73
+ <p>NCPlot is built on a small number of open-source Python tools for
74
+ working with netCDF and array data. Exact versions are pinned in
75
+ <a href="https://github.com/pmlmodelling/ncplot/blob/master/requirements.txt" target="_blank" rel="noopener">requirements.txt</a>.</p>
76
+ <p>File reading and array handling are provided by
77
+ <a href="https://xarray.dev/" target="_blank" rel="noopener">xarray</a>,
78
+ <a href="https://unidata.github.io/netcdf4-python/" target="_blank" rel="noopener">netCDF4</a>
79
+ and <a href="https://numpy.org/" target="_blank" rel="noopener">NumPy</a>,
80
+ with <a href="https://unidata.github.io/MetPy/" target="_blank" rel="noopener">MetPy</a>
81
+ helping recognise meteorological and oceanographic conventions.
82
+ Interactive plotting is powered by
83
+ <a href="https://hvplot.holoviz.org/" target="_blank" rel="noopener">hvPlot</a>,
84
+ <a href="https://holoviews.org/" target="_blank" rel="noopener">HoloViews</a>
85
+ and <a href="https://bokeh.org/" target="_blank" rel="noopener">Bokeh</a>,
86
+ served through <a href="https://panel.holoviz.org/" target="_blank" rel="noopener">Panel</a>.
87
+ Map plots use <a href="https://scitools.org.uk/cartopy/docs/latest/" target="_blank" rel="noopener">cartopy</a> for coastlines and
88
+ projections when it is installed.</p>
89
+ </div>
90
+ </div>
91
+
92
+ <footer class="site-footer">
93
+ <div class="container footer-pml">
94
+ <a href="https://pml.ac.uk/" target="_blank" rel="noopener"><img src="assets/img/pml_logo.jpg" alt="Plymouth Marine Laboratory"></a>
95
+ <span>Developed by the Environmental Intelligence group at Plymouth Marine Laboratory</span>
96
+ </div>
97
+ <div class="container footer-top">
98
+ <div class="footer-brand">
99
+ <img src="assets/img/ncplot_wordmark.svg" alt="NCPlot">
100
+ <p>Instant, interactive viewing of netCDF files in Python or on the command line.</p>
101
+ <div class="footer-social">
102
+ <a href="https://github.com/pmlmodelling/ncplot" target="_blank" rel="noopener" aria-label="GitHub">
103
+ <svg viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 .5C5.73.5.5 5.74.5 12.09c0 5.08 3.29 9.38 7.86 10.9.57.1.79-.25.79-.55 0-.27-.01-1.17-.02-2.12-3.2.7-3.88-1.36-3.88-1.36-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.17.08 1.78 1.2 1.78 1.2 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.56-.29-5.26-1.28-5.26-5.71 0-1.26.45-2.29 1.19-3.09-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11.1 11.1 0 0 1 5.79 0c2.2-1.49 3.17-1.18 3.17-1.18.64 1.59.24 2.76.12 3.05.74.8 1.18 1.83 1.18 3.09 0 4.44-2.7 5.42-5.28 5.7.42.36.78 1.08.78 2.17 0 1.57-.01 2.83-.01 3.22 0 .3.21.66.8.55A10.6 10.6 0 0 0 23.5 12.1C23.5 5.74 18.27.5 12 .5Z"/></svg>
104
+ </a>
105
+ <a href="mailto:rwi@pml.ac.uk" aria-label="Email">
106
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><polyline points="22,6 12,13 2,6"/></svg>
107
+ </a>
108
+ </div>
109
+ </div>
110
+ <div class="footer-col">
111
+ <h4>Documentation</h4>
112
+ <ul>
113
+ <li><a href="installing.html">Installing</a></li>
114
+ <li><a href="quickstart.html">Quickstart</a></li>
115
+ <li><a href="api.html">API reference</a></li>
116
+ </ul>
117
+ </div>
118
+ <div class="footer-col">
119
+ <h4>Project</h4>
120
+ <ul>
121
+ <li><a href="about.html">About &amp; contact</a></li>
122
+ <li><a href="version-history.html">Version history</a></li>
123
+ <li><a href="https://github.com/pmlmodelling/ncplot" target="_blank" rel="noopener">GitHub repository</a></li>
124
+ <li><a href="https://github.com/pmlmodelling/ncplot/issues" target="_blank" rel="noopener">Report an issue</a></li>
125
+ <li><a href="https://pypi.org/project/ncplot/" target="_blank" rel="noopener">PyPI package</a></li>
126
+ <li><a href="https://anaconda.org/conda-forge/ncplot" target="_blank" rel="noopener">conda-forge package</a></li>
127
+ </ul>
128
+ </div>
129
+ </div>
130
+ <div class="container footer-bottom">
131
+ <span>© 2026 Plymouth Marine Laboratory. Released under the GNU GPLv3 license.</span>
132
+ <span>Built for quick, no-fuss netCDF viewing.</span>
133
+ </div>
134
+ </footer>
135
+
136
+ <button class="back-to-top" aria-label="Back to top">
137
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="19" x2="12" y2="5"/><polyline points="5 12 12 5 19 12"/></svg>
138
+ </button>
139
+
140
+ <script src="assets/js/main.js"></script>
141
+ </body>
142
+ </html>
@@ -0,0 +1,175 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>API Reference — NCPlot</title>
7
+ <meta name="description" content="Function reference for ncplot: view(), the ncplot.xarray accessor, and the ncplot command line tool.">
8
+ <link rel="icon" type="image/svg+xml" href="assets/img/favicon.svg">
9
+ <link rel="preconnect" href="https://fonts.googleapis.com">
10
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
12
+ <link rel="stylesheet" href="assets/css/style.css">
13
+ </head>
14
+ <body>
15
+
16
+ <header class="site-header">
17
+ <div class="container nav">
18
+ <a class="brand" href="index.html">
19
+ <img src="assets/img/ncplot_wordmark.svg" alt="NCPlot">
20
+ <span id="ncplot-docs-version" class="brand-version">v&hellip;</span>
21
+ </a>
22
+ <nav class="nav-links" id="nav-links">
23
+ <a href="installing.html" data-page="installing.html">Install</a>
24
+ <a href="quickstart.html" data-page="quickstart.html">Quickstart</a>
25
+ <a href="api.html" data-page="api.html">API</a>
26
+ <a href="about.html" data-page="about.html">About</a>
27
+ <a href="version-history.html" data-page="version-history.html">Version history</a>
28
+ </nav>
29
+ <div class="nav-actions">
30
+ <a class="icon-btn" href="https://github.com/pmlmodelling/ncplot" target="_blank" rel="noopener" aria-label="NCPlot on GitHub">
31
+ <svg viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 .5C5.73.5.5 5.74.5 12.09c0 5.08 3.29 9.38 7.86 10.9.57.1.79-.25.79-.55 0-.27-.01-1.17-.02-2.12-3.2.7-3.88-1.36-3.88-1.36-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.17.08 1.78 1.2 1.78 1.2 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.56-.29-5.26-1.28-5.26-5.71 0-1.26.45-2.29 1.19-3.09-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11.1 11.1 0 0 1 5.79 0c2.2-1.49 3.17-1.18 3.17-1.18.64 1.59.24 2.76.12 3.05.74.8 1.18 1.83 1.18 3.09 0 4.44-2.7 5.42-5.28 5.7.42.36.78 1.08.78 2.17 0 1.57-.01 2.83-.01 3.22 0 .3.21.66.8.55A10.6 10.6 0 0 0 23.5 12.1C23.5 5.74 18.27.5 12 .5Z"/></svg>
32
+ </a>
33
+ <button class="nav-toggle" id="nav-toggle" aria-label="Toggle menu" aria-expanded="false">
34
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
35
+ </button>
36
+ </div>
37
+ </div>
38
+ </header>
39
+
40
+ <div class="page-hero">
41
+ <div class="container">
42
+ <div class="breadcrumb"><a href="index.html">Home</a> / API</div>
43
+ <h1>API reference</h1>
44
+ <p class="lead">NCPlot has one core function — <code>view()</code> — reachable three ways: directly from the top-level <code>ncplot</code> namespace, via the <code>ncplot.xarray</code> accessor, or from the <code>ncplot</code> command line tool.</p>
45
+ </div>
46
+ </div>
47
+
48
+ <div class="container docs-layout">
49
+ <aside class="docs-toc">
50
+ <div class="docs-toc-title">Reference</div>
51
+ <ul>
52
+ <li><a href="#view">view</a></li>
53
+ <li><a href="#xarray-accessor">ncplot.xarray accessor</a></li>
54
+ <li><a href="#cli">Command line</a></li>
55
+ </ul>
56
+ </aside>
57
+
58
+ <div class="docs-content">
59
+
60
+ <span class="kicker">Plotting</span>
61
+
62
+ <div class="api-card" id="view">
63
+ <div class="api-card__head"><div class="sig">ncplot.view(x, vars=None, autoscale=True, out=None, **kwargs)</div></div>
64
+ <div class="api-card__body">
65
+ <p>Plot the contents of a netCDF file, directory, remote URL, or xarray object.</p>
66
+ <details class="param-details" open>
67
+ <summary>Parameters</summary>
68
+ <p>Required:</p>
69
+ <ul class="param-list">
70
+ <li><code class="param-name">x</code><span class="param-tag">required</span><p>An xarray <code>Dataset</code>/<code>DataArray</code>, or a file path, directory, or remote (OPeNDAP/THREDDS) URL pointing to netCDF data.</p></li>
71
+ </ul>
72
+ <p>Optional:</p>
73
+ <ul class="param-list">
74
+ <li><code class="param-name">vars</code><p>A variable name, or list of variable names, to plot. If omitted, every variable in <code>x</code> is plotted.</p></li>
75
+ <li><code class="param-name">autoscale</code><p>Whether colour scales are set automatically from each variable's minimum and maximum values. Default <code>True</code>. Set to <code>False</code> to keep scales fixed, e.g. when comparing several plots.</p></li>
76
+ <li><code class="param-name">out</code><p>Path to save the plot to, instead of displaying it inline. Must end in <code>.html</code>.</p></li>
77
+ <li><code class="param-name">coast</code><p>Draw coastlines on map plots. Default <code>False</code>. Looks best with the optional <code>cartopy</code> dependency installed (see <a href="installing.html">Installing</a>).</p></li>
78
+ <li><code class="param-name">clim</code><p>A <code>(min, max)</code> tuple fixing the colour scale range, overriding <code>autoscale</code> for that call.</p></li>
79
+ </ul>
80
+ </details>
81
+ </div>
82
+ </div>
83
+
84
+ <span class="kicker">Accessors</span>
85
+
86
+ <div class="api-card" id="xarray-accessor">
87
+ <div class="api-card__head"><div class="sig">ncplot.xarray — Dataset.ncplot.view() / DataArray.ncplot.view()</div></div>
88
+ <div class="api-card__body">
89
+ <p>Importing <code>ncplot.xarray</code> registers a <code>.ncplot</code> accessor on every xarray <code>Dataset</code> and <code>DataArray</code>, mirroring xarray's own <code>.plot</code> accessor:</p>
90
+ <div class="code-block">
91
+ <div class="code-card__bar">
92
+ <div class="code-card__dots"><span></span><span></span><span></span></div>
93
+ <span class="code-card__label">python</span>
94
+ </div>
95
+ <pre><span class="tok-kw">import</span> ncplot.xarray
96
+ <span class="tok-kw">import</span> xarray <span class="tok-kw">as</span> xr
97
+
98
+ ds = xr.<span class="tok-fn">open_dataset</span>(<span class="tok-str">"example.nc"</span>)
99
+ ds.ncplot.<span class="tok-fn">view</span>(vars=<span class="tok-str">"sst"</span>, coast=<span class="tok-kw">True</span>)</pre>
100
+ </div>
101
+ <p><code>Dataset.ncplot.view(vars=None, **kwargs)</code> and <code>DataArray.ncplot.view(vars=None, **kwargs)</code> both call <a href="#view"><code>view()</code></a> underneath with <code>self</code> as <code>x</code> — every keyword argument documented above works here too.</p>
102
+ </div>
103
+ </div>
104
+
105
+ <span class="kicker">Command line</span>
106
+
107
+ <div class="api-card" id="cli">
108
+ <div class="api-card__head"><div class="sig">ncplot &lt;file [file ...]&gt;</div></div>
109
+ <div class="api-card__body">
110
+ <p>Installing NCPlot adds an <code>ncplot</code> console command. Give it one or more existing file paths or URLs and it opens an interactive view — a single argument is passed straight to <a href="#view"><code>view()</code></a>, multiple arguments are passed as a list:</p>
111
+ <div class="code-block">
112
+ <div class="code-card__bar">
113
+ <div class="code-card__dots"><span></span><span></span><span></span></div>
114
+ <span class="code-card__label">console</span>
115
+ </div>
116
+ <pre>$ ncplot example.nc
117
+ $ ncplot one.nc two.nc</pre>
118
+ </div>
119
+ </div>
120
+ </div>
121
+
122
+ </div>
123
+ </div>
124
+
125
+ <footer class="site-footer">
126
+ <div class="container footer-pml">
127
+ <a href="https://pml.ac.uk/" target="_blank" rel="noopener"><img src="assets/img/pml_logo.jpg" alt="Plymouth Marine Laboratory"></a>
128
+ <span>Developed by the Environmental Intelligence group at Plymouth Marine Laboratory</span>
129
+ </div>
130
+ <div class="container footer-top">
131
+ <div class="footer-brand">
132
+ <img src="assets/img/ncplot_wordmark.svg" alt="NCPlot">
133
+ <p>Instant, interactive viewing of netCDF files in Python or on the command line.</p>
134
+ <div class="footer-social">
135
+ <a href="https://github.com/pmlmodelling/ncplot" target="_blank" rel="noopener" aria-label="GitHub">
136
+ <svg viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 .5C5.73.5.5 5.74.5 12.09c0 5.08 3.29 9.38 7.86 10.9.57.1.79-.25.79-.55 0-.27-.01-1.17-.02-2.12-3.2.7-3.88-1.36-3.88-1.36-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.17.08 1.78 1.2 1.78 1.2 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.56-.29-5.26-1.28-5.26-5.71 0-1.26.45-2.29 1.19-3.09-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11.1 11.1 0 0 1 5.79 0c2.2-1.49 3.17-1.18 3.17-1.18.64 1.59.24 2.76.12 3.05.74.8 1.18 1.83 1.18 3.09 0 4.44-2.7 5.42-5.28 5.7.42.36.78 1.08.78 2.17 0 1.57-.01 2.83-.01 3.22 0 .3.21.66.8.55A10.6 10.6 0 0 0 23.5 12.1C23.5 5.74 18.27.5 12 .5Z"/></svg>
137
+ </a>
138
+ <a href="mailto:rwi@pml.ac.uk" aria-label="Email">
139
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><polyline points="22,6 12,13 2,6"/></svg>
140
+ </a>
141
+ </div>
142
+ </div>
143
+ <div class="footer-col">
144
+ <h4>Documentation</h4>
145
+ <ul>
146
+ <li><a href="installing.html">Installing</a></li>
147
+ <li><a href="quickstart.html">Quickstart</a></li>
148
+ <li><a href="api.html">API reference</a></li>
149
+ </ul>
150
+ </div>
151
+ <div class="footer-col">
152
+ <h4>Project</h4>
153
+ <ul>
154
+ <li><a href="about.html">About &amp; contact</a></li>
155
+ <li><a href="version-history.html">Version history</a></li>
156
+ <li><a href="https://github.com/pmlmodelling/ncplot" target="_blank" rel="noopener">GitHub repository</a></li>
157
+ <li><a href="https://github.com/pmlmodelling/ncplot/issues" target="_blank" rel="noopener">Report an issue</a></li>
158
+ <li><a href="https://pypi.org/project/ncplot/" target="_blank" rel="noopener">PyPI package</a></li>
159
+ <li><a href="https://anaconda.org/conda-forge/ncplot" target="_blank" rel="noopener">conda-forge package</a></li>
160
+ </ul>
161
+ </div>
162
+ </div>
163
+ <div class="container footer-bottom">
164
+ <span>© 2026 Plymouth Marine Laboratory. Released under the GNU GPLv3 license.</span>
165
+ <span>Built for quick, no-fuss netCDF viewing.</span>
166
+ </div>
167
+ </footer>
168
+
169
+ <button class="back-to-top" aria-label="Back to top">
170
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="19" x2="12" y2="5"/><polyline points="5 12 12 5 19 12"/></svg>
171
+ </button>
172
+
173
+ <script src="assets/js/main.js"></script>
174
+ </body>
175
+ </html>
@@ -0,0 +1 @@
1
+ []