mgplot 0.2.25__tar.gz → 0.2.26__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.2.25 → mgplot-0.2.26}/CHANGELOG.md +24 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/PKG-INFO +23 -3
- {mgplot-0.2.25 → mgplot-0.2.26}/README.md +22 -2
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/bar_plot.html +676 -518
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/fill_between_plot.html +213 -186
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/finalise_plot.html +10 -4
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/growth_plot.html +446 -418
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/line_plot.html +372 -346
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/postcovid_plot.html +1 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/run_plot.html +17 -6
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot.html +572 -445
- mgplot-0.2.26/docs/search.js +46 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/pyproject.toml +1 -1
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/bar_plot.py +87 -29
- mgplot-0.2.26/test/test_bar_horizontal.py +126 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/uv.lock +1 -1
- mgplot-0.2.25/docs/search.js +0 -46
- {mgplot-0.2.25 → mgplot-0.2.26}/.claude/settings.local.json +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/.gitignore +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/.pylintrc +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/.python-version +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/LICENSE +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/build-all.sh +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/build-docs.sh +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/index.html +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/revision_plot.html +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/seastrend_plot.html +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/docs/mgplot/summary_plot.html +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/__init__.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/axis_utils.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/colors.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/fill_between_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/finalise_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/finalisers.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/growth_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/keyword_checking.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/line_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/lint-all.sh +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/multi_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/postcovid_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/py.typed +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/revision_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/run_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/seastrend_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/settings.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/summary_plot.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/src/mgplot/utilities.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/test-executed.ipynb +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/test.ipynb +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/test_bar_string_index.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/test_chart_subdir.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/test_multi_series_ticks.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/test_splat_sequences.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/test_tick_relabel.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/test_zorder.py +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/zz-test-data/ocr_rba.csv +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/zz-test-data/revisions.csv +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/test/zz-test-data/summary.csv +0 -0
- {mgplot-0.2.25 → mgplot-0.2.26}/uv-upgrade.sh +0 -0
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
Version 0.2.26 - released 5-Jun-2026 (Canberra, Australia)
|
|
2
|
+
|
|
3
|
+
* enhancement
|
|
4
|
+
- added horizontal=True to bar_plot() (and bar_plot_finalise()):
|
|
5
|
+
plots grouped or stacked horizontal bars with category labels on
|
|
6
|
+
the y-axis and values along the x-axis. Designed for categorical
|
|
7
|
+
(string-indexed) data - ranked states, industries, expenditure
|
|
8
|
+
classes and the like. Bar annotations are placed at the bar ends
|
|
9
|
+
(or within bars), vertically centred. Sign-aware stacking
|
|
10
|
+
(negatives leftward, positives rightward) works as for vertical
|
|
11
|
+
stacked bars. horizontal=True with a PeriodIndex warns and falls
|
|
12
|
+
back to a vertical plot - period tick labelling is x-axis only
|
|
13
|
+
- bar_plot() with a single series now accepts one colour per bar:
|
|
14
|
+
if color is a sequence whose length matches the data, each bar is
|
|
15
|
+
painted individually (e.g. state colours on a ranked horizontal
|
|
16
|
+
bar chart). The in-bar annotation stroke effect picks the matching
|
|
17
|
+
per-bar colour. Multi-series colour semantics are unchanged
|
|
18
|
+
- added test/test_bar_horizontal.py covering string-index labels,
|
|
19
|
+
annotations, grouped/stacked, negative stacking, the PeriodIndex
|
|
20
|
+
fallback, per-bar colours, and label survival through
|
|
21
|
+
finalise_plot()
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
1
25
|
Version 0.2.25 - released 5-Jun-2026 (Canberra, Australia)
|
|
2
26
|
|
|
3
27
|
* enhancement
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mgplot
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.26
|
|
4
4
|
Summary: mgplot is a time-series/PeriodIndex frontend for matplotlib
|
|
5
5
|
Project-URL: Repository, https://github.com/bpalmer4/mgplot
|
|
6
6
|
Project-URL: Homepage, https://github.com/bpalmer4/mgplot
|
|
@@ -68,8 +68,9 @@ All plot functions take a pandas Series or DataFrame with a PeriodIndex
|
|
|
68
68
|
as the first argument and return a matplotlib Axes object. Keyword
|
|
69
69
|
arguments control styling and behavior:
|
|
70
70
|
|
|
71
|
-
- `bar_plot()` --
|
|
72
|
-
PeriodIndex labeling
|
|
71
|
+
- `bar_plot()` -- bar plot (grouped or stacked) with intelligent
|
|
72
|
+
PeriodIndex labeling; `horizontal=True` plots categorical data as
|
|
73
|
+
horizontal bars (categories on the y-axis, values along the x-axis)
|
|
73
74
|
- `fill_between_plot()` -- shaded region between two bounds (requires
|
|
74
75
|
2-column DataFrame)
|
|
75
76
|
- `growth_plot()` -- plots annual and periodic growth rates (requires
|
|
@@ -85,6 +86,25 @@ arguments control styling and behavior:
|
|
|
85
86
|
- `summary_plot()` -- latest data point against historical range with
|
|
86
87
|
z-score visualization
|
|
87
88
|
|
|
89
|
+
For ranked-category charts (states, industries, expenditure classes),
|
|
90
|
+
use `horizontal=True` with a string-indexed Series or DataFrame:
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
vacancies = vacancies.sort_values() # smallest at the bottom
|
|
94
|
+
mg.bar_plot_finalise(
|
|
95
|
+
vacancies,
|
|
96
|
+
horizontal=True,
|
|
97
|
+
annotate=True, # value labels at the bar ends
|
|
98
|
+
above=True,
|
|
99
|
+
x0=True, # zero line on the value axis
|
|
100
|
+
title="Job vacancies by industry",
|
|
101
|
+
xlabel="'000",
|
|
102
|
+
)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`horizontal=True` is for categorical data: with a PeriodIndex it warns
|
|
106
|
+
and falls back to a vertical plot.
|
|
107
|
+
|
|
88
108
|
Finalising Plots
|
|
89
109
|
----------------
|
|
90
110
|
Once a plot is generated, finalise it with titles, labels, and save to file:
|
|
@@ -52,8 +52,9 @@ All plot functions take a pandas Series or DataFrame with a PeriodIndex
|
|
|
52
52
|
as the first argument and return a matplotlib Axes object. Keyword
|
|
53
53
|
arguments control styling and behavior:
|
|
54
54
|
|
|
55
|
-
- `bar_plot()` --
|
|
56
|
-
PeriodIndex labeling
|
|
55
|
+
- `bar_plot()` -- bar plot (grouped or stacked) with intelligent
|
|
56
|
+
PeriodIndex labeling; `horizontal=True` plots categorical data as
|
|
57
|
+
horizontal bars (categories on the y-axis, values along the x-axis)
|
|
57
58
|
- `fill_between_plot()` -- shaded region between two bounds (requires
|
|
58
59
|
2-column DataFrame)
|
|
59
60
|
- `growth_plot()` -- plots annual and periodic growth rates (requires
|
|
@@ -69,6 +70,25 @@ arguments control styling and behavior:
|
|
|
69
70
|
- `summary_plot()` -- latest data point against historical range with
|
|
70
71
|
z-score visualization
|
|
71
72
|
|
|
73
|
+
For ranked-category charts (states, industries, expenditure classes),
|
|
74
|
+
use `horizontal=True` with a string-indexed Series or DataFrame:
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
vacancies = vacancies.sort_values() # smallest at the bottom
|
|
78
|
+
mg.bar_plot_finalise(
|
|
79
|
+
vacancies,
|
|
80
|
+
horizontal=True,
|
|
81
|
+
annotate=True, # value labels at the bar ends
|
|
82
|
+
above=True,
|
|
83
|
+
x0=True, # zero line on the value axis
|
|
84
|
+
title="Job vacancies by industry",
|
|
85
|
+
xlabel="'000",
|
|
86
|
+
)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`horizontal=True` is for categorical data: with a PeriodIndex it warns
|
|
90
|
+
and falls back to a vertical plot.
|
|
91
|
+
|
|
72
92
|
Finalising Plots
|
|
73
93
|
----------------
|
|
74
94
|
Once a plot is generated, finalise it with titles, labels, and save to file:
|