Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2bdd15b
add seaborn context processing
cvanelteren Nov 12, 2025
5cae6f0
rm debug
cvanelteren Nov 12, 2025
0786d28
add unittest
cvanelteren Nov 12, 2025
61ae661
resolve iterable
cvanelteren Nov 12, 2025
6dab0f2
relax legend filter
cvanelteren Nov 12, 2025
2887b3f
add seaborn import
cvanelteren Nov 12, 2025
d542103
add more unittests
cvanelteren Nov 12, 2025
4f9c13b
add ctx texts
cvanelteren Nov 12, 2025
7ea041c
implement mark external and context managing
cvanelteren Nov 12, 2025
c12de2b
fix test
cvanelteren Nov 12, 2025
80fef46
refactor classes for clarity
cvanelteren Nov 12, 2025
7d93bb1
update tests
cvanelteren Nov 12, 2025
288e8bb
more fixes
cvanelteren Nov 12, 2025
8ecccdd
more tests
cvanelteren Nov 12, 2025
aaa1cbc
minor fix
cvanelteren Nov 12, 2025
219e611
minor fix
cvanelteren Nov 12, 2025
3b5c90d
fix for mpl 3.9
cvanelteren Nov 13, 2025
9435fda
remove stack frame
cvanelteren Nov 13, 2025
4c44e82
adjust and remove unecessary tests
cvanelteren Nov 13, 2025
c8635c8
more fixes
cvanelteren Nov 13, 2025
3f969bf
add external to pass test
cvanelteren Nov 13, 2025
1b1ddc4
restore test
cvanelteren Nov 16, 2025
82fbb5d
rm dup
cvanelteren Nov 16, 2025
d5b2aa9
finalize docstring
cvanelteren Nov 16, 2025
8d2824c
remove fallback
cvanelteren Nov 17, 2025
8ee3fe3
Merge branch 'main' into add-seaborn-ctx
cvanelteren Nov 18, 2025
e6ba821
Apply suggestion from @beckermr
beckermr Nov 18, 2025
5923cdb
Apply suggestion from @beckermr
beckermr Nov 18, 2025
5287cdb
fix bar and test
cvanelteren Nov 19, 2025
d5df6a2
Merge branch 'main' into add-seaborn-ctx
cvanelteren Nov 19, 2025
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
Prev Previous commit
Next Next commit
finalize docstring
  • Loading branch information
cvanelteren committed Nov 16, 2025
commit d5b2aa99bb281382dac0ece6ecaf89e439071b01
45 changes: 38 additions & 7 deletions ultraplot/axes/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4403,14 +4403,45 @@ def _apply_fill(
stacked=None,
**kwargs,
):
"""
Apply area shading (fill_between / fill_betweenx) with seaborn helper tagging.
"""Apply area shading using `fill_between` or `fill_betweenx`.

This is the internal implementation for `fill_between`, `fill_betweenx`,
`area`, and `areax`.

Parameters
----------
xs, ys1, ys2 : array-like
The x and y coordinates for the shaded regions.
where : array-like, optional
A boolean mask for the points that should be shaded.
vert : bool, optional
The orientation of the shading. If `True` (default), `fill_between`
is used. If `False`, `fill_betweenx` is used.
negpos : bool, optional
Whether to use different colors for positive and negative shades.
stack : bool, optional
Whether to stack shaded regions.
**kwargs
Additional keyword arguments passed to the matplotlib fill function.

We tag seaborn-generated confidence interval / helper polygons as synthetic
unless the user explicitly supplies a label (label/labels/value/values or
shadelabel/fadelabel passed through error shading). Synthetic artists are
marked with _ultraplot_synthetic=True and given an underscore label so they
are ignored by legend collection.
Notes
-----
Special handling for plots from external packages (e.g., seaborn):

When this method is used in a context where plots are generated by
an external library like seaborn, it tags the resulting polygons
(e.g., confidence intervals) as "synthetic". This is done unless a
user explicitly provides a label.

Synthetic artists are marked with `_ultraplot_synthetic=True` and given
a label starting with an underscore (e.g., `_ultraplot_fill`). This
prevents them from being automatically included in legends, keeping the
legend clean and focused on user-specified elements.

Seaborn internally generates tags like "y", "ymin", and "ymax" for
vertical fills, and "x", "xmin", "xmax" for horizontal fills. UltraPlot
recognizes these and treats them as synthetic unless a different label
is provided.
"""
# Parse input arguments
kw = kwargs.copy()
Expand Down
Loading