mgplot 0.3.1__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.
Files changed (66) hide show
  1. {mgplot-0.3.1 → mgplot-0.3.3}/CHANGELOG.md +11 -0
  2. {mgplot-0.3.1 → mgplot-0.3.3}/PKG-INFO +1 -1
  3. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/line_plot.html +2 -2
  4. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot.html +1 -1
  5. {mgplot-0.3.1 → mgplot-0.3.3}/pyproject.toml +1 -1
  6. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/settings.py +2 -2
  7. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_scatter_plot.py +25 -9
  8. {mgplot-0.3.1 → mgplot-0.3.3}/uv.lock +1 -1
  9. {mgplot-0.3.1 → mgplot-0.3.3}/.claude/settings.local.json +0 -0
  10. {mgplot-0.3.1 → mgplot-0.3.3}/.gitignore +0 -0
  11. {mgplot-0.3.1 → mgplot-0.3.3}/.pylintrc +0 -0
  12. {mgplot-0.3.1 → mgplot-0.3.3}/.python-version +0 -0
  13. {mgplot-0.3.1 → mgplot-0.3.3}/LICENSE +0 -0
  14. {mgplot-0.3.1 → mgplot-0.3.3}/README.md +0 -0
  15. {mgplot-0.3.1 → mgplot-0.3.3}/build-all.sh +0 -0
  16. {mgplot-0.3.1 → mgplot-0.3.3}/build-docs.sh +0 -0
  17. {mgplot-0.3.1 → mgplot-0.3.3}/docs/index.html +0 -0
  18. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/bar_plot.html +0 -0
  19. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/fill_between_plot.html +0 -0
  20. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/finalise_plot.html +0 -0
  21. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/growth_plot.html +0 -0
  22. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/postcovid_plot.html +0 -0
  23. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/revision_plot.html +0 -0
  24. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/run_plot.html +0 -0
  25. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/scatter_plot.html +0 -0
  26. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/seastrend_plot.html +0 -0
  27. {mgplot-0.3.1 → mgplot-0.3.3}/docs/mgplot/summary_plot.html +0 -0
  28. {mgplot-0.3.1 → mgplot-0.3.3}/docs/search.js +0 -0
  29. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/__init__.py +0 -0
  30. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/annotation_utils.py +0 -0
  31. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/axis_utils.py +0 -0
  32. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/bar_plot.py +0 -0
  33. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/colors.py +0 -0
  34. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/fill_between_plot.py +0 -0
  35. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/finalise_plot.py +0 -0
  36. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/finalisers.py +0 -0
  37. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/growth_plot.py +0 -0
  38. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/keyword_checking.py +0 -0
  39. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/line_plot.py +0 -0
  40. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/lint-all.sh +0 -0
  41. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/multi_plot.py +0 -0
  42. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/postcovid_plot.py +0 -0
  43. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/py.typed +0 -0
  44. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/revision_plot.py +0 -0
  45. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/run_plot.py +0 -0
  46. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/scatter_plot.py +0 -0
  47. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/seastrend_plot.py +0 -0
  48. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/summary_plot.py +0 -0
  49. {mgplot-0.3.1 → mgplot-0.3.3}/src/mgplot/utilities.py +0 -0
  50. {mgplot-0.3.1 → mgplot-0.3.3}/test/test-executed.ipynb +0 -0
  51. {mgplot-0.3.1 → mgplot-0.3.3}/test/test.ipynb +0 -0
  52. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_annotate_text.py +0 -0
  53. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_annotation_collision.py +0 -0
  54. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_axvline_text.py +0 -0
  55. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_bar_horizontal.py +0 -0
  56. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_bar_string_index.py +0 -0
  57. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_chart_subdir.py +0 -0
  58. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_line_end_rounding.py +0 -0
  59. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_multi_series_ticks.py +0 -0
  60. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_splat_sequences.py +0 -0
  61. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_tick_relabel.py +0 -0
  62. {mgplot-0.3.1 → mgplot-0.3.3}/test/test_zorder.py +0 -0
  63. {mgplot-0.3.1 → mgplot-0.3.3}/test/zz-test-data/ocr_rba.csv +0 -0
  64. {mgplot-0.3.1 → mgplot-0.3.3}/test/zz-test-data/revisions.csv +0 -0
  65. {mgplot-0.3.1 → mgplot-0.3.3}/test/zz-test-data/summary.csv +0 -0
  66. {mgplot-0.3.1 → mgplot-0.3.3}/uv-upgrade.sh +0 -0
@@ -1,3 +1,14 @@
1
+ Version 0.3.3 - released 02-Oct-2026 (Canberra, Australia)
2
+
3
+ * minor changes
4
+ - default colours changed.
5
+ - fixed test/test_scatter_plot.py
6
+
7
+ Version 0.3.2 - released 02-Oct-2026 (Canberra, Australia)
8
+
9
+ * minor changes
10
+ - default colours changed.
11
+
1
12
  Version 0.3.1 - released 02-Oct-2026 (Canberra, Australia)
2
13
 
3
14
  * minor changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mgplot
3
- Version: 0.3.1
3
+ Version: 0.3.3
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
@@ -312,7 +312,7 @@
312
312
  </span><span id="L-143"><a href="#L-143"><span class="linenos">143</span></a>
313
313
  </span><span id="L-144"><a href="#L-144"><span class="linenos">144</span></a><span class="sd"> """</span>
314
314
  </span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a> <span class="n">data_point_thresh</span> <span class="o">=</span> <span class="mi">151</span> <span class="c1"># switch from wide to narrow lines</span>
315
- </span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a> <span class="n">force_lines_styles</span> <span class="o">=</span> <span class="mi">4</span>
315
+ </span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a> <span class="n">force_lines_styles</span> <span class="o">=</span> <span class="mi">5</span>
316
316
  </span><span id="L-147"><a href="#L-147"><span class="linenos">147</span></a>
317
317
  </span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a> <span class="n">line_defaults</span><span class="p">:</span> <span class="nb">dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span>
318
318
  </span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a> <span class="s2">"style"</span><span class="p">:</span> <span class="p">(</span><span class="s2">"solid"</span> <span class="k">if</span> <span class="n">item_count</span> <span class="o">&lt;=</span> <span class="n">force_lines_styles</span> <span class="k">else</span> <span class="p">[</span><span class="s2">"solid"</span><span class="p">,</span> <span class="s2">"dashed"</span><span class="p">,</span> <span class="s2">"dashdot"</span><span class="p">,</span> <span class="s2">"dotted"</span><span class="p">]),</span>
@@ -983,7 +983,7 @@ so the caller can register it for end-of-line collision resolution.</p>
983
983
  </span><span id="get_style_width_color_etc-144"><a href="#get_style_width_color_etc-144"><span class="linenos">144</span></a>
984
984
  </span><span id="get_style_width_color_etc-145"><a href="#get_style_width_color_etc-145"><span class="linenos">145</span></a><span class="sd"> """</span>
985
985
  </span><span id="get_style_width_color_etc-146"><a href="#get_style_width_color_etc-146"><span class="linenos">146</span></a> <span class="n">data_point_thresh</span> <span class="o">=</span> <span class="mi">151</span> <span class="c1"># switch from wide to narrow lines</span>
986
- </span><span id="get_style_width_color_etc-147"><a href="#get_style_width_color_etc-147"><span class="linenos">147</span></a> <span class="n">force_lines_styles</span> <span class="o">=</span> <span class="mi">4</span>
986
+ </span><span id="get_style_width_color_etc-147"><a href="#get_style_width_color_etc-147"><span class="linenos">147</span></a> <span class="n">force_lines_styles</span> <span class="o">=</span> <span class="mi">5</span>
987
987
  </span><span id="get_style_width_color_etc-148"><a href="#get_style_width_color_etc-148"><span class="linenos">148</span></a>
988
988
  </span><span id="get_style_width_color_etc-149"><a href="#get_style_width_color_etc-149"><span class="linenos">149</span></a> <span class="n">line_defaults</span><span class="p">:</span> <span class="nb">dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span>
989
989
  </span><span id="get_style_width_color_etc-150"><a href="#get_style_width_color_etc-150"><span class="linenos">150</span></a> <span class="s2">"style"</span><span class="p">:</span> <span class="p">(</span><span class="s2">"solid"</span> <span class="k">if</span> <span class="n">item_count</span> <span class="o">&lt;=</span> <span class="n">force_lines_styles</span> <span class="k">else</span> <span class="p">[</span><span class="s2">"solid"</span><span class="p">,</span> <span class="s2">"dashed"</span><span class="p">,</span> <span class="s2">"dashdot"</span><span class="p">,</span> <span class="s2">"dotted"</span><span class="p">]),</span>
@@ -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">&#39;0.3.0&#39;</span>
2741
+ <span class="default_value">&#39;0.3.2&#39;</span>
2742
2742
 
2743
2743
 
2744
2744
  </div>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mgplot"
3
- version = "0.3.1"
3
+ version = "0.3.3"
4
4
  description = "mgplot is a time-series/PeriodIndex frontend for matplotlib"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -62,8 +62,8 @@ mgplot_defaults = DefaultTypes(
62
62
  "fontsize": "x-small",
63
63
  },
64
64
  colors={
65
- 1: ["#dd0000"],
66
- 5: ["blue", "darkorange", "cornflowerblue", "brown", "gray"],
65
+ # 1: ["#dd0000"],
66
+ 5: ["mediumblue", "darkorange", "#83AAF1", "firebrick", "#999999"],
67
67
  9: [
68
68
  "blue",
69
69
  "darkorange",
@@ -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 multi_start, scatter_plot, scatter_plot_finalise, set_chart_dir
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
- df = pd.DataFrame({"x": [1.0, 2.0, 3.0], "y": [1.0, 2.0, 3.0]})
111
- _, ax = plt.subplots()
112
- scatter_plot(df, ax=ax)
113
- expected = mcolors.to_rgba("blue", alpha=0.6) # get_color_list(1)[0], DEFAULT_ALPHA
114
- got = np.asarray(_points(ax).get_facecolor())[0]
115
- assert np.allclose(got, expected), f"Expected {expected}, got {got}"
116
- plt.close("all")
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
 
@@ -951,7 +951,7 @@ wheels = [
951
951
 
952
952
  [[package]]
953
953
  name = "mgplot"
954
- version = "0.3.1"
954
+ version = "0.3.3"
955
955
  source = { editable = "." }
956
956
  dependencies = [
957
957
  { name = "matplotlib" },
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