ggh4x-python 0.3.1.9000__py3-none-any.whl

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 (64) hide show
  1. ggh4x/__init__.py +140 -0
  2. ggh4x/_aimed_text_grob.py +432 -0
  3. ggh4x/_borrowed_ggplot2.py +273 -0
  4. ggh4x/_cli.py +84 -0
  5. ggh4x/_datasets.py +106 -0
  6. ggh4x/_download.py +111 -0
  7. ggh4x/_facet_helpers.py +313 -0
  8. ggh4x/_facet_utils.py +649 -0
  9. ggh4x/_gap_grobs.py +606 -0
  10. ggh4x/_registry.py +10 -0
  11. ggh4x/_rlang.py +93 -0
  12. ggh4x/_utils.py +150 -0
  13. ggh4x/_vctrs.py +233 -0
  14. ggh4x/conveniences.py +601 -0
  15. ggh4x/coord_axes_inside.py +380 -0
  16. ggh4x/element_part_rect.py +545 -0
  17. ggh4x/facet_grid2.py +1018 -0
  18. ggh4x/facet_manual.py +901 -0
  19. ggh4x/facet_nested.py +776 -0
  20. ggh4x/facet_nested_wrap.py +193 -0
  21. ggh4x/facet_wrap2.py +896 -0
  22. ggh4x/geom_box.py +536 -0
  23. ggh4x/geom_outline_point.py +444 -0
  24. ggh4x/geom_pointpath.py +259 -0
  25. ggh4x/geom_polygonraster.py +252 -0
  26. ggh4x/geom_rectrug.py +489 -0
  27. ggh4x/geom_text_aimed.py +279 -0
  28. ggh4x/guide_stringlegend.py +354 -0
  29. ggh4x/help_secondary.py +549 -0
  30. ggh4x/multiscale/__init__.py +51 -0
  31. ggh4x/multiscale/_multiscale_add.py +207 -0
  32. ggh4x/multiscale/scale_listed.py +167 -0
  33. ggh4x/multiscale/scale_manual.py +478 -0
  34. ggh4x/multiscale/scale_multi.py +393 -0
  35. ggh4x/panel_scales/__init__.py +58 -0
  36. ggh4x/panel_scales/at_panel.py +115 -0
  37. ggh4x/panel_scales/facetted_pos_scales.py +647 -0
  38. ggh4x/panel_scales/force_panelsize.py +411 -0
  39. ggh4x/panel_scales/scale_facet.py +222 -0
  40. ggh4x/position_disjoint_ranges.py +229 -0
  41. ggh4x/position_lineartrans.py +242 -0
  42. ggh4x/py.typed +0 -0
  43. ggh4x/resources/faithful.csv +273 -0
  44. ggh4x/resources/iris.csv +151 -0
  45. ggh4x/resources/mtcars.csv +33 -0
  46. ggh4x/resources/pressure.csv +20 -0
  47. ggh4x/resources/volcano.csv +87 -0
  48. ggh4x/save.py +255 -0
  49. ggh4x/stat_difference.py +388 -0
  50. ggh4x/stat_funxy.py +436 -0
  51. ggh4x/stat_rle.py +290 -0
  52. ggh4x/stat_rollingkernel.py +369 -0
  53. ggh4x/stat_theodensity.py +681 -0
  54. ggh4x/strip_nested.py +448 -0
  55. ggh4x/strip_split.py +687 -0
  56. ggh4x/strip_tag.py +636 -0
  57. ggh4x/strip_themed.py +232 -0
  58. ggh4x/strip_vanilla.py +1464 -0
  59. ggh4x/themes.py +31 -0
  60. ggh4x/themes_ggh4x.py +67 -0
  61. ggh4x_python-0.3.1.9000.dist-info/METADATA +40 -0
  62. ggh4x_python-0.3.1.9000.dist-info/RECORD +64 -0
  63. ggh4x_python-0.3.1.9000.dist-info/WHEEL +4 -0
  64. ggh4x_python-0.3.1.9000.dist-info/licenses/LICENSE +3 -0
ggh4x/themes.py ADDED
@@ -0,0 +1,31 @@
1
+ """ggh4x theme-element registration (R source: themes.R).
2
+
3
+ ggh4x extends ggplot2's theme system with the ``ggh4x.facet.nestline`` element used by
4
+ ``facet_nested`` / ``facet_nested_wrap``. (The ``ggh4x.axis.*`` nesting elements belong to
5
+ the deprecated axis guides and are out of scope.) R registers these in ``.onLoad``; the
6
+ Python port registers them at import time of the package.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from ggplot2_py.theme_elements import el_def, element_blank, register_theme_elements
12
+
13
+ __all__ = ["register_ggh4x_theme_elements"]
14
+
15
+ _REGISTERED = False
16
+
17
+
18
+ def register_ggh4x_theme_elements() -> None:
19
+ """Register ggh4x's theme elements globally (idempotent), mirroring ``ggh4x_theme_elements``.
20
+
21
+ Registers ``ggh4x.facet.nestline`` as an ``ElementLine`` inheriting from ``line``, with a
22
+ blank default — matching ``themes.R``.
23
+ """
24
+ global _REGISTERED
25
+ if _REGISTERED:
26
+ return
27
+ register_theme_elements(
28
+ element_tree={"ggh4x.facet.nestline": el_def("ElementLine", "line")},
29
+ **{"ggh4x.facet.nestline": element_blank()},
30
+ )
31
+ _REGISTERED = True
ggh4x/themes_ggh4x.py ADDED
@@ -0,0 +1,67 @@
1
+ """ggh4x theme-element registration (port of ggh4x ``themes.R``).
2
+
3
+ ggh4x extends ggplot2's theme system with a handful of extra theme elements.
4
+ The one registered here is ``ggh4x.facet.nestline`` -- an
5
+ :class:`~ggplot2_py.theme_elements.ElementLine` inheriting from the ``line``
6
+ element, used as the parent for the ``nest_line`` argument of
7
+ ``facet_nested()`` / ``facet_nested_wrap()``. It defaults to
8
+ ``element_blank()`` (nest lines are off unless a theme/facet turns them on).
9
+
10
+ R source: ``ggh4x/R/themes.R`` (``ggh4x_theme_elements``). In R the
11
+ registration happens in ``.onLoad``; this Python port mirrors that by invoking
12
+ :func:`ggh4x_theme_elements` at *module import time* (bottom of this file).
13
+
14
+ Notes
15
+ -----
16
+ * The element is consumed by the **facet** subsystem (nest lines), not by the
17
+ strips themselves, but registration lives here to match the R file layout.
18
+ * Registration is idempotent: :func:`register_theme_elements` merges into the
19
+ global element tree, so re-importing the module is harmless.
20
+ """
21
+
22
+ from __future__ import annotations
23
+
24
+ from ggplot2_py.theme_elements import (
25
+ ElementLine,
26
+ el_def,
27
+ element_blank,
28
+ register_theme_elements,
29
+ )
30
+
31
+ __all__ = ["ggh4x_theme_elements"]
32
+
33
+
34
+ def ggh4x_theme_elements() -> None:
35
+ """Register ggh4x's extended theme elements globally.
36
+
37
+ Port of R ``ggh4x_theme_elements()`` (``themes.R:30-37``)::
38
+
39
+ register_theme_elements(
40
+ ggh4x.facet.nestline = element_blank(),
41
+ element_tree = list(
42
+ ggh4x.facet.nestline = el_def("element_line", "line")
43
+ )
44
+ )
45
+
46
+ Registers ``ggh4x.facet.nestline`` in the element tree as an
47
+ :class:`~ggplot2_py.theme_elements.ElementLine` that inherits from the
48
+ ``line`` element, with an ``element_blank()`` default.
49
+
50
+ Returns
51
+ -------
52
+ None
53
+ Mutates the global ggplot2 element tree / default theme in place.
54
+
55
+ Notes
56
+ -----
57
+ Idempotent -- calling it repeatedly merges the same entry and re-sets the
58
+ same blank default.
59
+ """
60
+ register_theme_elements(
61
+ element_tree={"ggh4x.facet.nestline": el_def(ElementLine, "line")},
62
+ **{"ggh4x.facet.nestline": element_blank()},
63
+ )
64
+
65
+
66
+ # R registers in .onLoad; mirror that by registering at import time.
67
+ ggh4x_theme_elements()
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.4
2
+ Name: ggh4x-python
3
+ Version: 0.3.1.9000
4
+ Summary: Python port of the R ggh4x package
5
+ Project-URL: Homepage, https://github.com/Bio-Babel/ggh4x-python
6
+ Project-URL: Issues, https://github.com/Bio-Babel/ggh4x-python/issues
7
+ Author-email: Jeffery Liu <jeffliu.lucky@gmail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.10
11
+ Requires-Dist: ggplot2-python>=4.0.2
12
+ Requires-Dist: gtable-python>=0.3.6
13
+ Requires-Dist: numpy>=1.24
14
+ Requires-Dist: pandas>=2.0
15
+ Requires-Dist: patchwork-python>=1.3.2
16
+ Requires-Dist: rgrid-python>=4.5.3
17
+ Requires-Dist: scales-python>=1.4.0
18
+ Requires-Dist: scipy>=1.10
19
+ Provides-Extra: dev
20
+ Requires-Dist: pytest; extra == 'dev'
21
+ Requires-Dist: pytest-cov; extra == 'dev'
22
+ Requires-Dist: ruff; extra == 'dev'
23
+ Provides-Extra: docs
24
+ Requires-Dist: mkdocs; extra == 'docs'
25
+ Requires-Dist: mkdocs-jupyter; extra == 'docs'
26
+ Requires-Dist: mkdocs-material; extra == 'docs'
27
+ Requires-Dist: mkdocstrings[python]; extra == 'docs'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # ggh4x-python
31
+
32
+ [![PyPI](https://img.shields.io/pypi/v/ggh4x-python)](https://pypi.org/project/ggh4x-python/)
33
+
34
+ Python version of the R **ggh4x** package.
35
+
36
+ ## Installation
37
+
38
+ ```bash
39
+ pip install ggh4x-python
40
+ ```
@@ -0,0 +1,64 @@
1
+ ggh4x/__init__.py,sha256=Y1fiEI6WfgtjScb2EgubMkBDEpVCfaz9dPr9fOJUMIc,5353
2
+ ggh4x/_aimed_text_grob.py,sha256=XGUYmg8MM9ebIjkaleLnM5V0w1CxMptcaZsi9zpgsWU,14347
3
+ ggh4x/_borrowed_ggplot2.py,sha256=23N4wwWhBJM7sa6o861bg9IBBTQkSF51D1ibi50bX24,8606
4
+ ggh4x/_cli.py,sha256=2Z1AMXE8kV8j8UlXHLpj9koayLpYhColg8GPWtuDkEI,2440
5
+ ggh4x/_datasets.py,sha256=ol3BrpcxVulbNFBpBq-sCFXKHWe57WdkOrSFNgg2o08,2895
6
+ ggh4x/_download.py,sha256=SP0CfMcEieyM-RDmFjD_AvL2e6o27BaGJpcMHPPLGog,3317
7
+ ggh4x/_facet_helpers.py,sha256=fUKce3ojKODOLBjzUDZGugayGDJIKdbwaUmbl5EK8Vw,11121
8
+ ggh4x/_facet_utils.py,sha256=iBSKmdlSDppF49SQbQx080XFGM_nLefSTZD8aeTQt8c,23313
9
+ ggh4x/_gap_grobs.py,sha256=wYHkrzvsMNI0kLwdevc_DFqwNZbg2rsJ_6g2nCjvLs0,19443
10
+ ggh4x/_registry.py,sha256=AzmW8r7vG2Id5N-BZIFZ5t87ch5kFHF7K-nCzeJK89c,262
11
+ ggh4x/_rlang.py,sha256=KcDQuEx1Sgi7IW5YcZJ6C3Y5RAy7bJsrlyl2lHnZ7XA,2273
12
+ ggh4x/_utils.py,sha256=-96sIq3NmqpVOVUNTx_CcoEXbBhze-zKysdp-m8b-Fg,4208
13
+ ggh4x/_vctrs.py,sha256=C7r_YIJIh_04qqJ6yAh-WAqiIJD_VEyzcyPAYlf6jT0,6322
14
+ ggh4x/conveniences.py,sha256=fdcWL5Pc9AMTYg0_PYstoZkOFSU-UwS2Yk-462CQeus,19744
15
+ ggh4x/coord_axes_inside.py,sha256=DNyhPzw4XLRvqfbfMT85TYstBF4QBUvrsMlNIUPWlBg,14212
16
+ ggh4x/element_part_rect.py,sha256=H1GrUuo_2RI1kJww63jYe33qfWkd90j5IIntL02juQU,18167
17
+ ggh4x/facet_grid2.py,sha256=2PUWTsHQtf18-N6AcJzzQxb-szZpxreqtk9NJxKOYWU,35929
18
+ ggh4x/facet_manual.py,sha256=Jf_UL-9GdXwE44vKu45aCze4w4H8XeFwequUbnnVZT8,34060
19
+ ggh4x/facet_nested.py,sha256=p-HAW8oHglFOv9SetQ-lcieB8Zb4VhOz_v-WRNsu9rs,29787
20
+ ggh4x/facet_nested_wrap.py,sha256=BHiALrC2XoEP-uSx3WCMgl-pBh-FAPZ57UfeaIDBNyE,6256
21
+ ggh4x/facet_wrap2.py,sha256=HH2Qw9B9-6acFLWAUDLMH_EcmDJ0P8QAiNYqklkM2T0,30572
22
+ ggh4x/geom_box.py,sha256=qzGkRsTTH7JiNeUP2qCkVxvG1_UeowruWfcFqYOQZMg,18489
23
+ ggh4x/geom_outline_point.py,sha256=wJDhSt1M8EQxjXABImkw1seqyD48ZyX-6OethVd0s90,13441
24
+ ggh4x/geom_pointpath.py,sha256=t5lXX6YS-mO5Uhc9MTDpsodyySDDOg9rhSohGVGiNvc,8599
25
+ ggh4x/geom_polygonraster.py,sha256=kUWUBSAPGzHRK0mn6RAbOhu0mJJCuI-Azs0Eum9u0zA,8014
26
+ ggh4x/geom_rectrug.py,sha256=h3J825FShRZ-F46eZOz71GuMWwywo0qOdgEB_H_orHk,15580
27
+ ggh4x/geom_text_aimed.py,sha256=xG5LCPJJ7mrtL3CDVsEp43GXk1Q2Pzyurk3GsqNFN7c,9449
28
+ ggh4x/guide_stringlegend.py,sha256=ZKYMXgZ2q1vT24lrhwv4HCXhLPM4vXFHIjgCiPOX3DQ,12726
29
+ ggh4x/help_secondary.py,sha256=8khb5tceYw8LdRIzSmd_Uie7wiqa8c0cj1F4TJiwffo,18696
30
+ ggh4x/position_disjoint_ranges.py,sha256=ZZB1ddUcqs8xUu3YleJwK5U3P2Q1vSZzBaBEIAptWl4,8969
31
+ ggh4x/position_lineartrans.py,sha256=XjTpIgRolEZDow6fJz2o2mHBNBOmEGrWvzdxy7LiZbg,8876
32
+ ggh4x/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ ggh4x/save.py,sha256=CmacFLPyFkBBIe543I-hQTzgoHIsG4aEiftIN4oXHCc,8562
34
+ ggh4x/stat_difference.py,sha256=kzYOfxYC0ayF4So3giiysX4uD8n5oMXSolOWC6cB2iY,14546
35
+ ggh4x/stat_funxy.py,sha256=J8UzSx5tMBgyMq1T11l2J57jYGcrjoLUUdQAxaZS6pk,13915
36
+ ggh4x/stat_rle.py,sha256=GwGu-FRKakSTsdVwWb-wMzqAO2g5jw0XcEHPCxxLrQI,9927
37
+ ggh4x/stat_rollingkernel.py,sha256=plMooVXH187XgpJX6Oyof_ha8PMvE_902zcT9MrmOVA,12142
38
+ ggh4x/stat_theodensity.py,sha256=lQmAPK5bLUphFJlRgb78cqJg3FsgV1Z0XZH78iJRJYY,22468
39
+ ggh4x/strip_nested.py,sha256=SOJooxzYIoxCPd3DiAcR7ShVgia1dtmzE-EfBjome9c,15454
40
+ ggh4x/strip_split.py,sha256=Hong7sEyQZLUdIc_K1YArcup-l1eR9knkhnDJ0Ro0U0,24323
41
+ ggh4x/strip_tag.py,sha256=cUC5jtMrYGMfcWCbYJeDEO9gNaBEsF4w9gPM6q5pe4k,22766
42
+ ggh4x/strip_themed.py,sha256=Yxss2DJSLbz-B61Ufk0AQB-e3Vo5QzvHF2gGTniIivw,9350
43
+ ggh4x/strip_vanilla.py,sha256=6zwTTmUZLOmi7qqW70qkHqDkq6kWnhbT5t5SrpOjNHw,49716
44
+ ggh4x/themes.py,sha256=3Swd7_ttaj4Au9lEkFNcTNDX-l1q7h_EuiLn1-MJsKo,1115
45
+ ggh4x/themes_ggh4x.py,sha256=Egk-lt4IE3SJRrzlJPRZG2-RJQCeVrFZNMVYRE3_LE4,2271
46
+ ggh4x/multiscale/__init__.py,sha256=5FSxe4kljjS4BLwpVICoAhsZPysLcrpgi1Q5VsQCeCs,1831
47
+ ggh4x/multiscale/_multiscale_add.py,sha256=p91h4E4jRYHj-J4x0merpL8BI5gwh90pnwzVanzomY4,8436
48
+ ggh4x/multiscale/scale_listed.py,sha256=6EEmFnOBLtSRz0k2huNNfM7AGjkKOJqnJXnLh_E6NE0,6477
49
+ ggh4x/multiscale/scale_manual.py,sha256=0Ea8pIBcmV08RpnDnu1-4_mqAyajEEPGwc-mIGleYGg,17418
50
+ ggh4x/multiscale/scale_multi.py,sha256=iT1F8YcWHiqS1Tb7TIMS5K2XaHPR3ZHf5d2ijLqDxXg,13799
51
+ ggh4x/panel_scales/__init__.py,sha256=TatdWJ33rWcETtCJkmP39z-4eyU8Uipyn3BIRhD2G_k,1999
52
+ ggh4x/panel_scales/at_panel.py,sha256=WKv9985uVdbIovr0QIDkVC4IPHnIqvAhyMXUaDH4rGs,3644
53
+ ggh4x/panel_scales/facetted_pos_scales.py,sha256=6pK3BqABaAK8JqegLftx1BHkMtEhbeUJoj2aMyuViUw,21997
54
+ ggh4x/panel_scales/force_panelsize.py,sha256=Q6T56ZntUMFX179VyewoekLcit_o96_U2awv0xRedXo,15204
55
+ ggh4x/panel_scales/scale_facet.py,sha256=6IrmUMDE16uN_J6CUu7NwfehCOMUvnfjqdkW--Q9SVY,7194
56
+ ggh4x/resources/faithful.csv,sha256=LanvZyMat1QtLsPlp0Go1TrakqJBAxlc59H5uONqmG0,2275
57
+ ggh4x/resources/iris.csv,sha256=1EDa3tGGNMHaLwXmsaMDhfKsps04RVsx0mPhZXJgESo,4026
58
+ ggh4x/resources/mtcars.csv,sha256=Q5ujNcPSjdDBhx91vf-zidWjsjz3AydVZnABQMlSOuU,1783
59
+ ggh4x/resources/pressure.csv,sha256=ZgsBAvBiLG-tltSQp7QohOzCesENOXEMUz874MymAps,183
60
+ ggh4x/resources/volcano.csv,sha256=OqjcDHc-bIN4h46r-AONCxBEDIb_Cuy6Q_BhDMJbSvo,20810
61
+ ggh4x_python-0.3.1.9000.dist-info/METADATA,sha256=kcGJvRj7D54W986wLT1ptacKG2BlMpXmd4NB9qn0XxM,1219
62
+ ggh4x_python-0.3.1.9000.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
63
+ ggh4x_python-0.3.1.9000.dist-info/licenses/LICENSE,sha256=E0GJjw07cYRmJYj_8UZKbhevWQ-Swd3nVR6qBddvz9c,39
64
+ ggh4x_python-0.3.1.9000.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.30.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ # MIT
2
+
3
+ See DESCRIPTION from R package.