xarray-plotly 0.0.12__tar.gz → 0.0.13__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 (47) hide show
  1. xarray_plotly-0.0.13/.github/workflows/pr-title.yml +33 -0
  2. xarray_plotly-0.0.13/.github/workflows/release-please.yml +19 -0
  3. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/.github/workflows/release.yml +0 -7
  4. xarray_plotly-0.0.13/.release-please-config.json +13 -0
  5. xarray_plotly-0.0.13/.release-please-manifest.json +3 -0
  6. xarray_plotly-0.0.13/CHANGELOG.md +8 -0
  7. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/PKG-INFO +20 -1
  8. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/README.md +19 -0
  9. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/tests/test_figures.py +2 -2
  10. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly/figures.py +23 -8
  11. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly.egg-info/PKG-INFO +20 -1
  12. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly.egg-info/SOURCES.txt +5 -0
  13. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/.github/dependabot.yml +0 -0
  14. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/.github/workflows/ci.yml +0 -0
  15. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/.github/workflows/dependabot-auto-merge.yml +0 -0
  16. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/.github/workflows/docs.yml +0 -0
  17. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/.gitignore +0 -0
  18. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/.pre-commit-config.yaml +0 -0
  19. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/CONTRIBUTING.md +0 -0
  20. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/LICENSE +0 -0
  21. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/api.md +0 -0
  22. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/examples/combining.ipynb +0 -0
  23. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/examples/datasets.ipynb +0 -0
  24. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/examples/dimensions.ipynb +0 -0
  25. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/examples/fast_bar.ipynb +0 -0
  26. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/examples/figure.ipynb +0 -0
  27. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/examples/kwargs.ipynb +0 -0
  28. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/examples/manipulation.ipynb +0 -0
  29. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/examples/plot-types.ipynb +0 -0
  30. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/getting-started.ipynb +0 -0
  31. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/docs/index.md +0 -0
  32. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/mkdocs.yml +0 -0
  33. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/pyproject.toml +0 -0
  34. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/setup.cfg +0 -0
  35. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/tests/__init__.py +0 -0
  36. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/tests/test_accessor.py +0 -0
  37. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/tests/test_common.py +0 -0
  38. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/tests/test_config.py +0 -0
  39. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly/__init__.py +0 -0
  40. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly/accessor.py +0 -0
  41. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly/common.py +0 -0
  42. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly/config.py +0 -0
  43. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly/plotting.py +0 -0
  44. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly/py.typed +0 -0
  45. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly.egg-info/dependency_links.txt +0 -0
  46. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly.egg-info/requires.txt +0 -0
  47. {xarray_plotly-0.0.12 → xarray_plotly-0.0.13}/xarray_plotly.egg-info/top_level.txt +0 -0
@@ -0,0 +1,33 @@
1
+ name: PR Title Check
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, edited, synchronize, reopened]
6
+
7
+ jobs:
8
+ validate:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: amannn/action-semantic-pull-request@v5
12
+ env:
13
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14
+ with:
15
+ # Require conventional commit format: type(scope): description
16
+ # Types allowed (default set)
17
+ types: |
18
+ feat
19
+ fix
20
+ docs
21
+ style
22
+ refactor
23
+ perf
24
+ test
25
+ build
26
+ ci
27
+ chore
28
+ revert
29
+ # Scope is optional
30
+ requireScope: false
31
+ # Subject (description) requirements
32
+ subjectPattern: ^.+$
33
+ subjectPatternError: "PR title must have a description after the type"
@@ -0,0 +1,19 @@
1
+ name: Release Please
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ release-please:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: googleapis/release-please-action@v4
17
+ with:
18
+ config-file: .release-please-config.json
19
+ manifest-file: .release-please-manifest.json
@@ -10,7 +10,6 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  permissions:
12
12
  id-token: write # for trusted publishing
13
- contents: write # for creating GitHub release
14
13
 
15
14
  steps:
16
15
  - uses: actions/checkout@v6
@@ -23,9 +22,3 @@ jobs:
23
22
 
24
23
  - name: Publish to PyPI
25
24
  uses: pypa/gh-action-pypi-publish@release/v1
26
-
27
- - name: Create GitHub Release
28
- uses: softprops/action-gh-release@v2
29
- with:
30
- generate_release_notes: true
31
- files: dist/*
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
+ "bootstrap-sha": "3c1b9d991a58c2369fe4817ad2f3d555aaab969e",
4
+ "include-component-in-tag": false,
5
+ "packages": {
6
+ ".": {
7
+ "release-type": "simple",
8
+ "package-name": "xarray_plotly",
9
+ "bump-patch-for-minor-pre-major": true,
10
+ "changelog-path": "CHANGELOG.md"
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.0.13"
3
+ }
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## [0.0.13](https://github.com/FBumann/xarray_plotly/compare/v0.0.12...v0.0.13) (2026-01-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * secondary y axis match and visibility when faceted ([#32](https://github.com/FBumann/xarray_plotly/issues/32)) ([10da229](https://github.com/FBumann/xarray_plotly/commit/10da229282377a229054321e8ff98e3fd6825939))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xarray_plotly
3
- Version: 0.0.12
3
+ Version: 0.0.13
4
4
  Summary: Interactive Plotly Express plotting accessor for xarray
5
5
  Author: Felix
6
6
  License: MIT
@@ -84,6 +84,25 @@ fig = xpx(da).line()
84
84
 
85
85
  Full documentation: [https://fbumann.github.io/xarray_plotly](https://fbumann.github.io/xarray_plotly)
86
86
 
87
+ ## Roadmap
88
+
89
+ Planned additions (contributions welcome):
90
+
91
+ **New plot types**
92
+ - `histogram()` — distribution of DataArray values
93
+ - `violin()` — richer distribution visualization than box plots
94
+ - `density_heatmap()` — 2D histograms (x and y as dimensions)
95
+ - `density_contour()` — 2D density contours (x and y as dimensions)
96
+
97
+ **Enhancements**
98
+ - WebGL rendering option for `line()` and `scatter()` (large datasets)
99
+
100
+ **Figure utilities** (facet/animation-aware)
101
+ - `fill_between()` — fill area between two traces (uncertainty bands)
102
+ - `sync_axes()` — consistent axis ranges across facets and animation frames
103
+ - `add_secondary_x()` — secondary x-axis (like `add_secondary_y()`)
104
+ - `stack()` — vertically stack separate figures into subplots
105
+
87
106
  ## License
88
107
 
89
108
  MIT
@@ -42,6 +42,25 @@ fig = xpx(da).line()
42
42
 
43
43
  Full documentation: [https://fbumann.github.io/xarray_plotly](https://fbumann.github.io/xarray_plotly)
44
44
 
45
+ ## Roadmap
46
+
47
+ Planned additions (contributions welcome):
48
+
49
+ **New plot types**
50
+ - `histogram()` — distribution of DataArray values
51
+ - `violin()` — richer distribution visualization than box plots
52
+ - `density_heatmap()` — 2D histograms (x and y as dimensions)
53
+ - `density_contour()` — 2D density contours (x and y as dimensions)
54
+
55
+ **Enhancements**
56
+ - WebGL rendering option for `line()` and `scatter()` (large datasets)
57
+
58
+ **Figure utilities** (facet/animation-aware)
59
+ - `fill_between()` — fill area between two traces (uncertainty bands)
60
+ - `sync_axes()` — consistent axis ranges across facets and animation frames
61
+ - `add_secondary_x()` — secondary x-axis (like `add_secondary_y()`)
62
+ - `stack()` — vertically stack separate figures into subplots
63
+
45
64
  ## License
46
65
 
47
66
  MIT
@@ -505,8 +505,8 @@ class TestAddSecondaryYFacets:
505
505
 
506
506
  combined = add_secondary_y(base, secondary, secondary_y_title="Custom Title")
507
507
 
508
- # Title should be on the first secondary axis
509
- assert combined.layout.yaxis4.title.text == "Custom Title"
508
+ # Title should be on the rightmost secondary axis (yaxis6 for 3 facets)
509
+ assert combined.layout.yaxis6.title.text == "Custom Title"
510
510
 
511
511
 
512
512
  class TestAddSecondaryYAnimation:
@@ -308,6 +308,13 @@ def add_secondary_y(
308
308
  # Build mapping from primary y-axes to secondary y-axes
309
309
  y_mapping = _build_secondary_y_mapping(base_axes)
310
310
 
311
+ # Build x-y correspondence from base_axes (which x-axis pairs with which y-axis)
312
+ x_for_y = {yaxis: xaxis for xaxis, yaxis in base_axes}
313
+
314
+ # Find the rightmost x-axis (highest number) to determine which secondary axis shows ticks
315
+ rightmost_x = max(x_for_y.values(), key=lambda x: int(x[1:]) if x != "x" else 1)
316
+ rightmost_primary_y = next(y for y, x in x_for_y.items() if x == rightmost_x)
317
+
311
318
  # Create new figure with base's layout
312
319
  combined = go.Figure(layout=copy.deepcopy(base.layout))
313
320
 
@@ -322,24 +329,32 @@ def add_secondary_y(
322
329
  trace_copy.yaxis = y_mapping[original_yaxis]
323
330
  combined.add_trace(trace_copy)
324
331
 
332
+ # Get the rightmost secondary y-axis name for linking
333
+ rightmost_secondary_y = y_mapping[rightmost_primary_y]
334
+
325
335
  # Configure secondary y-axes
326
336
  for primary_yaxis, secondary_yaxis in y_mapping.items():
327
- # Get title - only set on first secondary axis or use provided title
337
+ is_rightmost = primary_yaxis == rightmost_primary_y
338
+
339
+ # Get title - only set on rightmost secondary axis
328
340
  title = None
329
- if secondary_y_title is not None:
330
- # Only set title on the first secondary axis to avoid repetition
331
- if primary_yaxis == "y":
341
+ if is_rightmost:
342
+ if secondary_y_title is not None:
332
343
  title = secondary_y_title
333
- elif primary_yaxis == "y" and secondary.layout.yaxis and secondary.layout.yaxis.title:
334
- # Try to get from secondary's layout
335
- title = secondary.layout.yaxis.title.text
344
+ elif secondary.layout.yaxis and secondary.layout.yaxis.title:
345
+ title = secondary.layout.yaxis.title.text
336
346
 
337
347
  # Configure the secondary axis
348
+ # Anchor to the corresponding x-axis so it appears on the right side of its subplot
338
349
  axis_config = {
339
350
  "title": title,
340
351
  "overlaying": primary_yaxis,
341
352
  "side": "right",
342
- "anchor": "free" if primary_yaxis != "y" else None,
353
+ "anchor": x_for_y[primary_yaxis],
354
+ # Only show ticks on the rightmost secondary axis
355
+ "showticklabels": is_rightmost,
356
+ # Link non-rightmost axes to the rightmost for consistent scaling
357
+ "matches": None if is_rightmost else rightmost_secondary_y,
343
358
  }
344
359
  # Remove None values
345
360
  axis_config = {k: v for k, v in axis_config.items() if v is not None}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xarray_plotly
3
- Version: 0.0.12
3
+ Version: 0.0.13
4
4
  Summary: Interactive Plotly Express plotting accessor for xarray
5
5
  Author: Felix
6
6
  License: MIT
@@ -84,6 +84,25 @@ fig = xpx(da).line()
84
84
 
85
85
  Full documentation: [https://fbumann.github.io/xarray_plotly](https://fbumann.github.io/xarray_plotly)
86
86
 
87
+ ## Roadmap
88
+
89
+ Planned additions (contributions welcome):
90
+
91
+ **New plot types**
92
+ - `histogram()` — distribution of DataArray values
93
+ - `violin()` — richer distribution visualization than box plots
94
+ - `density_heatmap()` — 2D histograms (x and y as dimensions)
95
+ - `density_contour()` — 2D density contours (x and y as dimensions)
96
+
97
+ **Enhancements**
98
+ - WebGL rendering option for `line()` and `scatter()` (large datasets)
99
+
100
+ **Figure utilities** (facet/animation-aware)
101
+ - `fill_between()` — fill area between two traces (uncertainty bands)
102
+ - `sync_axes()` — consistent axis ranges across facets and animation frames
103
+ - `add_secondary_x()` — secondary x-axis (like `add_secondary_y()`)
104
+ - `stack()` — vertically stack separate figures into subplots
105
+
87
106
  ## License
88
107
 
89
108
  MIT
@@ -1,5 +1,8 @@
1
1
  .gitignore
2
2
  .pre-commit-config.yaml
3
+ .release-please-config.json
4
+ .release-please-manifest.json
5
+ CHANGELOG.md
3
6
  CONTRIBUTING.md
4
7
  LICENSE
5
8
  README.md
@@ -9,6 +12,8 @@ pyproject.toml
9
12
  .github/workflows/ci.yml
10
13
  .github/workflows/dependabot-auto-merge.yml
11
14
  .github/workflows/docs.yml
15
+ .github/workflows/pr-title.yml
16
+ .github/workflows/release-please.yml
12
17
  .github/workflows/release.yml
13
18
  docs/api.md
14
19
  docs/getting-started.ipynb
File without changes
File without changes