mgplot 0.3.2__tar.gz → 0.3.3__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.
- {mgplot-0.3.2 → mgplot-0.3.3}/CHANGELOG.md +6 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/PKG-INFO +1 -1
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot.html +1 -1
- {mgplot-0.3.2 → mgplot-0.3.3}/pyproject.toml +1 -1
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/settings.py +1 -1
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_scatter_plot.py +25 -9
- {mgplot-0.3.2 → mgplot-0.3.3}/uv.lock +1 -1
- {mgplot-0.3.2 → mgplot-0.3.3}/.claude/settings.local.json +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/.gitignore +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/.pylintrc +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/.python-version +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/LICENSE +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/README.md +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/build-all.sh +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/build-docs.sh +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/index.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/bar_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/fill_between_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/finalise_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/growth_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/line_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/postcovid_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/revision_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/run_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/scatter_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/seastrend_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/mgplot/summary_plot.html +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/docs/search.js +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/__init__.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/annotation_utils.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/axis_utils.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/bar_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/colors.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/fill_between_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/finalise_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/finalisers.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/growth_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/keyword_checking.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/line_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/lint-all.sh +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/multi_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/postcovid_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/py.typed +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/revision_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/run_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/scatter_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/seastrend_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/summary_plot.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/src/mgplot/utilities.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test-executed.ipynb +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test.ipynb +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_annotate_text.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_annotation_collision.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_axvline_text.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_bar_horizontal.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_bar_string_index.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_chart_subdir.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_line_end_rounding.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_multi_series_ticks.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_splat_sequences.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_tick_relabel.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/test_zorder.py +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/zz-test-data/ocr_rba.csv +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/zz-test-data/revisions.csv +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/test/zz-test-data/summary.csv +0 -0
- {mgplot-0.3.2 → mgplot-0.3.3}/uv-upgrade.sh +0 -0
|
@@ -2738,7 +2738,7 @@ for color management and finalising plots with consistent styling.</p>
|
|
|
2738
2738
|
<section id="__version__">
|
|
2739
2739
|
<div class="attr variable">
|
|
2740
2740
|
<span class="name">__version__</span> =
|
|
2741
|
-
<span class="default_value">'0.3.
|
|
2741
|
+
<span class="default_value">'0.3.2'</span>
|
|
2742
2742
|
|
|
2743
2743
|
|
|
2744
2744
|
</div>
|
|
@@ -19,7 +19,14 @@ from matplotlib.axes import Axes
|
|
|
19
19
|
from matplotlib.collections import PathCollection
|
|
20
20
|
from matplotlib.lines import Line2D
|
|
21
21
|
|
|
22
|
-
from mgplot import
|
|
22
|
+
from mgplot import (
|
|
23
|
+
get_setting,
|
|
24
|
+
multi_start,
|
|
25
|
+
scatter_plot,
|
|
26
|
+
scatter_plot_finalise,
|
|
27
|
+
set_chart_dir,
|
|
28
|
+
set_setting,
|
|
29
|
+
)
|
|
23
30
|
|
|
24
31
|
mpl.use("Agg")
|
|
25
32
|
|
|
@@ -106,14 +113,23 @@ def test_empty_after_dropna() -> None:
|
|
|
106
113
|
|
|
107
114
|
|
|
108
115
|
def test_default_style() -> None:
|
|
109
|
-
"""Default colour comes from the mgplot palette, not a hard-coded name.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
"""Default colour comes from the mgplot palette, not a hard-coded name.
|
|
117
|
+
|
|
118
|
+
A one-entry palette with a colour no code path would produce by accident
|
|
119
|
+
means only a lookup of the palette can pass.
|
|
120
|
+
"""
|
|
121
|
+
saved = get_setting("colors")
|
|
122
|
+
set_setting("colors", {1: ["#123456"]})
|
|
123
|
+
try:
|
|
124
|
+
df = pd.DataFrame({"x": [1.0, 2.0, 3.0], "y": [1.0, 2.0, 3.0]})
|
|
125
|
+
_, ax = plt.subplots()
|
|
126
|
+
scatter_plot(df, ax=ax)
|
|
127
|
+
expected = mcolors.to_rgba("#123456", alpha=0.6) # palette colour, DEFAULT_ALPHA
|
|
128
|
+
got = np.asarray(_points(ax).get_facecolor())[0]
|
|
129
|
+
assert np.allclose(got, expected), f"Expected {expected}, got {got}"
|
|
130
|
+
finally:
|
|
131
|
+
set_setting("colors", saved)
|
|
132
|
+
plt.close("all")
|
|
117
133
|
print("PASS: default style")
|
|
118
134
|
|
|
119
135
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|