babelplot 2022.11__tar.gz → 2025.2__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 (57) hide show
  1. babelplot-2025.2/MANIFEST.in +4 -0
  2. babelplot-2025.2/PKG-INFO +163 -0
  3. babelplot-2025.2/README-COPYRIGHT-utf8.txt +44 -0
  4. babelplot-2025.2/README.rst +129 -0
  5. babelplot-2025.2/documentation/wiki/description.asciidoc +74 -0
  6. babelplot-2025.2/package/babelplot/__init__.py +70 -0
  7. babelplot-2025.2/package/babelplot/backend/catalog/bokeh_.py +172 -0
  8. {babelplot-2022.11/babelplot/backend → babelplot-2025.2/package/babelplot/backend/catalog}/matplotlib_.py +115 -68
  9. {babelplot-2022.11/babelplot/backend → babelplot-2025.2/package/babelplot/backend/catalog}/plotly_.py +85 -58
  10. babelplot-2025.2/package/babelplot/backend/catalog/vedo_.py +154 -0
  11. {babelplot-2022.11 → babelplot-2025.2/package}/babelplot/backend/helper/creation.py +56 -33
  12. {babelplot-2022.11 → babelplot-2025.2/package}/babelplot/backend/helper/validation.py +64 -42
  13. babelplot-2025.2/package/babelplot/backend/specification/backend.py +121 -0
  14. babelplot-2025.2/package/babelplot/backend/specification/runtime.py +77 -0
  15. babelplot-2025.2/package/babelplot/constant/backend.py +53 -0
  16. babelplot-2025.2/package/babelplot/constant/project.py +53 -0
  17. babelplot-2025.2/package/babelplot/extension/enum_.py +69 -0
  18. {babelplot-2022.11 → babelplot-2025.2/package}/babelplot/help.py +61 -34
  19. babelplot-2025.2/package/babelplot/main.py +177 -0
  20. babelplot-2025.2/package/babelplot/specification/dimension.py +129 -0
  21. {babelplot-2022.11/babelplot/backend → babelplot-2025.2/package/babelplot}/specification/plot.py +81 -54
  22. babelplot-2025.2/package/babelplot/task/show_pyqt6.py +100 -0
  23. babelplot-2025.2/package/babelplot/type/base.py +141 -0
  24. {babelplot-2022.11 → babelplot-2025.2/package}/babelplot/type/figure.py +77 -59
  25. babelplot-2025.2/package/babelplot/type/frame.py +166 -0
  26. babelplot-2025.2/package/babelplot/type/plot.py +119 -0
  27. babelplot-2025.2/package/babelplot/version.py +53 -0
  28. babelplot-2025.2/package/babelplot.egg-info/PKG-INFO +163 -0
  29. babelplot-2025.2/package/babelplot.egg-info/SOURCES.txt +35 -0
  30. {babelplot-2022.11 → babelplot-2025.2/package}/babelplot.egg-info/requires.txt +1 -1
  31. {babelplot-2022.11 → babelplot-2025.2}/pyproject.toml +0 -1
  32. babelplot-2025.2/requirements.txt +3 -0
  33. babelplot-2025.2/setup.py +155 -0
  34. babelplot-2022.11/MANIFEST.in +0 -2
  35. babelplot-2022.11/PKG-INFO +0 -60
  36. babelplot-2022.11/README-COPYRIGHT-utf8.txt +0 -16
  37. babelplot-2022.11/README.rst +0 -41
  38. babelplot-2022.11/babelplot/__init__.py +0 -35
  39. babelplot-2022.11/babelplot/backend/bokeh_.py +0 -147
  40. babelplot-2022.11/babelplot/backend/brick/html.py +0 -74
  41. babelplot-2022.11/babelplot/backend/gr_.py +0 -35
  42. babelplot-2022.11/babelplot/backend/runtime.py +0 -59
  43. babelplot-2022.11/babelplot/backend/specification/implemented.py +0 -99
  44. babelplot-2022.11/babelplot/backend/vedo_.py +0 -128
  45. babelplot-2022.11/babelplot/main.py +0 -155
  46. babelplot-2022.11/babelplot/standard/enum_extensions.py +0 -47
  47. babelplot-2022.11/babelplot/type/base.py +0 -114
  48. babelplot-2022.11/babelplot/type/dimension.py +0 -106
  49. babelplot-2022.11/babelplot/type/frame.py +0 -128
  50. babelplot-2022.11/babelplot/type/plot.py +0 -97
  51. babelplot-2022.11/babelplot.egg-info/PKG-INFO +0 -60
  52. babelplot-2022.11/babelplot.egg-info/SOURCES.txt +0 -31
  53. babelplot-2022.11/setup.py +0 -130
  54. {babelplot-2022.11 → babelplot-2025.2}/README-LICENCE-utf8.txt +0 -0
  55. {babelplot-2022.11 → babelplot-2025.2/package}/babelplot.egg-info/dependency_links.txt +0 -0
  56. {babelplot-2022.11 → babelplot-2025.2/package}/babelplot.egg-info/top_level.txt +0 -0
  57. {babelplot-2022.11 → babelplot-2025.2}/setup.cfg +0 -0
@@ -0,0 +1,4 @@
1
+ include README-COPYRIGHT-utf8.txt
2
+ include README-LICENCE-utf8.txt
3
+ include requirements.txt
4
+ include documentation/wiki/description.asciidoc
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.2
2
+ Name: babelplot
3
+ Version: 2025.2
4
+ Summary: A Meta Plotting Library That Speaks Several Backends
5
+ Home-page: https://src.koda.cnrs.fr/eric.debreuve/babelplot/
6
+ Author: Eric Debreuve
7
+ Author-email: eric.debreuve@cnrs.fr
8
+ License: CeCILL-2.1
9
+ Project-URL: Documentation, https://src.koda.cnrs.fr/eric.debreuve/babelplot/-/wikis/home
10
+ Project-URL: Source, https://src.koda.cnrs.fr/eric.debreuve/babelplot/
11
+ Keywords: plot,library
12
+ Classifier: Topic :: Scientific/Engineering :: Visualization
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Development Status :: 3 - Alpha
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/x-rst
19
+ Requires-Dist: numpy
20
+ Requires-Dist: PyQt6
21
+ Requires-Dist: scikit-image
22
+ Dynamic: author
23
+ Dynamic: author-email
24
+ Dynamic: classifier
25
+ Dynamic: description
26
+ Dynamic: description-content-type
27
+ Dynamic: home-page
28
+ Dynamic: keywords
29
+ Dynamic: license
30
+ Dynamic: project-url
31
+ Dynamic: requires-dist
32
+ Dynamic: requires-python
33
+ Dynamic: summary
34
+
35
+ ..
36
+ Copyright CNRS/Inria/UniCA
37
+ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2022
38
+ SEE COPYRIGHT NOTICE BELOW
39
+
40
+ .. |PROJECT_NAME| replace:: BabelPlot
41
+ .. |SHORT_DESCRIPTION| replace:: A Meta Plotting Library That Speaks Several Backends
42
+
43
+ .. |PYPI_NAME_LITERAL| replace:: ``babelplot``
44
+ .. |PYPI_PROJECT_URL| replace:: https://pypi.org/project/babelplot/
45
+ .. _PYPI_PROJECT_URL: https://pypi.org/project/babelplot/
46
+
47
+ .. |DOCUMENTATION_URL| replace:: https://src.koda.cnrs.fr/eric.debreuve/babelplot/-/wikis/home
48
+ .. _DOCUMENTATION_URL: https://src.koda.cnrs.fr/eric.debreuve/babelplot/-/wikis/home
49
+
50
+ .. |DEPENDENCIES_MANDATORY| replace:: numpy, PyQt6, scikit-image
51
+ .. |DEPENDENCIES_OPTIONAL| replace:: bokeh, matplotlib, plotly, vedo
52
+
53
+
54
+
55
+ ===================================
56
+ |PROJECT_NAME|: |SHORT_DESCRIPTION|
57
+ ===================================
58
+
59
+
60
+
61
+ Documentation
62
+ =============
63
+
64
+ The documentation is available at |DOCUMENTATION_URL|_.
65
+
66
+
67
+
68
+ Installation
69
+ ============
70
+
71
+ This project is published
72
+ on the `Python Package Index (PyPI) <https://pypi.org/>`_
73
+ at: |PYPI_PROJECT_URL|_.
74
+ It should be installable from Python distribution platforms or Integrated Development Environments (IDEs).
75
+ Otherwise, it can be installed from a command console using `pip <https://pip.pypa.io/>`_:
76
+
77
+ +--------------+-------------------------------------------------------+----------------------------------------------------------+
78
+ | | For all users (after acquiring administrative rights) | For the current user (no administrative rights required) |
79
+ +==============+=======================================================+==========================================================+
80
+ | Installation | ``pip install`` |PYPI_NAME_LITERAL| | ``pip install --user`` |PYPI_NAME_LITERAL| |
81
+ +--------------+-------------------------------------------------------+----------------------------------------------------------+
82
+ | Update | ``pip install --upgrade`` |PYPI_NAME_LITERAL| | ``pip install --user --upgrade`` |PYPI_NAME_LITERAL| |
83
+ +--------------+-------------------------------------------------------+----------------------------------------------------------+
84
+
85
+ Prior to using ``BabelPlot``, a (backend) plotting library must be installed (one of the optional dependencies below).
86
+ If in doubt, `Matplotlib <https://matplotlib.org>`_ should be installed.
87
+
88
+ .. note:: The `BabelPlot` project is currently in alpha stage: API and runtime stabilities are both unreliable.
89
+
90
+
91
+
92
+ Dependencies
93
+ ============
94
+
95
+ The development relies on several packages:
96
+
97
+ - Mandatory: |DEPENDENCIES_MANDATORY|
98
+ - Optional: |DEPENDENCIES_OPTIONAL|
99
+
100
+ The mandatory dependencies, if any, are installed automatically by `pip <https://pip.pypa.io/>`_, if they are not already, as part of the installation of |PROJECT_NAME|.
101
+ Python distribution platforms or Integrated Development Environments (IDEs) should also take care of this.
102
+ The optional dependencies, if any, must be installed independently by following the related instructions, for added functionalities of |PROJECT_NAME|.
103
+
104
+
105
+
106
+ Acknowledgments
107
+ ===============
108
+
109
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
110
+ :target: https://github.com/psf/black
111
+ .. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
112
+ :target: https://pycqa.github.io/isort/
113
+
114
+ The project is developed with `PyCharm Community <https://www.jetbrains.com/pycharm/>`_.
115
+
116
+ The code is formatted by `Black <https://github.com/psf/black/>`_, *The Uncompromising Code Formatter*.
117
+
118
+ The imports are ordered by `isort <https://github.com/timothycrosley/isort/>`_... *your imports, so you don't have to*.
119
+
120
+ ..
121
+ COPYRIGHT NOTICE
122
+
123
+ This software is governed by the CeCILL license under French law and
124
+ abiding by the rules of distribution of free software. You can use,
125
+ modify and/ or redistribute the software under the terms of the CeCILL
126
+ license as circulated by CEA, CNRS and INRIA at the following URL
127
+ "http://www.cecill.info".
128
+
129
+ As a counterpart to the access to the source code and rights to copy,
130
+ modify and redistribute granted by the license, users are provided only
131
+ with a limited warranty and the software's author, the holder of the
132
+ economic rights, and the successive licensors have only limited
133
+ liability.
134
+
135
+ In this respect, the user's attention is drawn to the risks associated
136
+ with loading, using, modifying and/or developing or reproducing the
137
+ software by the user in light of its specific status of free software,
138
+ that may mean that it is complicated to manipulate, and that also
139
+ therefore means that it is reserved for developers and experienced
140
+ professionals having in-depth computer knowledge. Users are therefore
141
+ encouraged to load and test the software's suitability as regards their
142
+ requirements in conditions enabling the security of their systems and/or
143
+ data to be ensured and, more generally, to use and operate it in the
144
+ same conditions as regards security.
145
+
146
+ The fact that you are presently reading this means that you have had
147
+ knowledge of the CeCILL license and that you accept its terms.
148
+
149
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
150
+
151
+ This software is being developed by Eric Debreuve, a CNRS employee and
152
+ member of team Morpheme.
153
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
154
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
155
+ I3S, and Laboratory iBV.
156
+
157
+ CNRS: https://www.cnrs.fr/index.php/en
158
+ Inria: https://www.inria.fr/en/
159
+ UniCA: https://univ-cotedazur.eu/
160
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
161
+ I3S: https://www.i3s.unice.fr/en/
162
+ iBV: http://ibv.unice.fr/
163
+ Team Morpheme: https://team.inria.fr/morpheme/
@@ -0,0 +1,44 @@
1
+ Copyright CNRS/Inria/UniCA
2
+ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2022
3
+
4
+ This software is governed by the CeCILL license under French law and
5
+ abiding by the rules of distribution of free software. You can use,
6
+ modify and/ or redistribute the software under the terms of the CeCILL
7
+ license as circulated by CEA, CNRS and INRIA at the following URL
8
+ "http://www.cecill.info".
9
+
10
+ As a counterpart to the access to the source code and rights to copy,
11
+ modify and redistribute granted by the license, users are provided only
12
+ with a limited warranty and the software's author, the holder of the
13
+ economic rights, and the successive licensors have only limited
14
+ liability.
15
+
16
+ In this respect, the user's attention is drawn to the risks associated
17
+ with loading, using, modifying and/or developing or reproducing the
18
+ software by the user in light of its specific status of free software,
19
+ that may mean that it is complicated to manipulate, and that also
20
+ therefore means that it is reserved for developers and experienced
21
+ professionals having in-depth computer knowledge. Users are therefore
22
+ encouraged to load and test the software's suitability as regards their
23
+ requirements in conditions enabling the security of their systems and/or
24
+ data to be ensured and, more generally, to use and operate it in the
25
+ same conditions as regards security.
26
+
27
+ The fact that you are presently reading this means that you have had
28
+ knowledge of the CeCILL license and that you accept its terms.
29
+
30
+ SEE LICENCE NOTICE: README-LICENCE-utf8.txt
31
+
32
+ This software is being developed by Eric Debreuve, a CNRS employee and
33
+ member of team Morpheme.
34
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
35
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
36
+ I3S, and Laboratory iBV.
37
+
38
+ CNRS: https://www.cnrs.fr/index.php/en
39
+ Inria: https://www.inria.fr/en/
40
+ UniCA: https://univ-cotedazur.eu/
41
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
42
+ I3S: https://www.i3s.unice.fr/en/
43
+ iBV: http://ibv.unice.fr/
44
+ Team Morpheme: https://team.inria.fr/morpheme/
@@ -0,0 +1,129 @@
1
+ ..
2
+ Copyright CNRS/Inria/UniCA
3
+ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2022
4
+ SEE COPYRIGHT NOTICE BELOW
5
+
6
+ .. |PROJECT_NAME| replace:: BabelPlot
7
+ .. |SHORT_DESCRIPTION| replace:: A Meta Plotting Library That Speaks Several Backends
8
+
9
+ .. |PYPI_NAME_LITERAL| replace:: ``babelplot``
10
+ .. |PYPI_PROJECT_URL| replace:: https://pypi.org/project/babelplot/
11
+ .. _PYPI_PROJECT_URL: https://pypi.org/project/babelplot/
12
+
13
+ .. |DOCUMENTATION_URL| replace:: https://src.koda.cnrs.fr/eric.debreuve/babelplot/-/wikis/home
14
+ .. _DOCUMENTATION_URL: https://src.koda.cnrs.fr/eric.debreuve/babelplot/-/wikis/home
15
+
16
+ .. |DEPENDENCIES_MANDATORY| replace:: numpy, PyQt6, scikit-image
17
+ .. |DEPENDENCIES_OPTIONAL| replace:: bokeh, matplotlib, plotly, vedo
18
+
19
+
20
+
21
+ ===================================
22
+ |PROJECT_NAME|: |SHORT_DESCRIPTION|
23
+ ===================================
24
+
25
+
26
+
27
+ Documentation
28
+ =============
29
+
30
+ The documentation is available at |DOCUMENTATION_URL|_.
31
+
32
+
33
+
34
+ Installation
35
+ ============
36
+
37
+ This project is published
38
+ on the `Python Package Index (PyPI) <https://pypi.org/>`_
39
+ at: |PYPI_PROJECT_URL|_.
40
+ It should be installable from Python distribution platforms or Integrated Development Environments (IDEs).
41
+ Otherwise, it can be installed from a command console using `pip <https://pip.pypa.io/>`_:
42
+
43
+ +--------------+-------------------------------------------------------+----------------------------------------------------------+
44
+ | | For all users (after acquiring administrative rights) | For the current user (no administrative rights required) |
45
+ +==============+=======================================================+==========================================================+
46
+ | Installation | ``pip install`` |PYPI_NAME_LITERAL| | ``pip install --user`` |PYPI_NAME_LITERAL| |
47
+ +--------------+-------------------------------------------------------+----------------------------------------------------------+
48
+ | Update | ``pip install --upgrade`` |PYPI_NAME_LITERAL| | ``pip install --user --upgrade`` |PYPI_NAME_LITERAL| |
49
+ +--------------+-------------------------------------------------------+----------------------------------------------------------+
50
+
51
+ Prior to using ``BabelPlot``, a (backend) plotting library must be installed (one of the optional dependencies below).
52
+ If in doubt, `Matplotlib <https://matplotlib.org>`_ should be installed.
53
+
54
+ .. note:: The `BabelPlot` project is currently in alpha stage: API and runtime stabilities are both unreliable.
55
+
56
+
57
+
58
+ Dependencies
59
+ ============
60
+
61
+ The development relies on several packages:
62
+
63
+ - Mandatory: |DEPENDENCIES_MANDATORY|
64
+ - Optional: |DEPENDENCIES_OPTIONAL|
65
+
66
+ The mandatory dependencies, if any, are installed automatically by `pip <https://pip.pypa.io/>`_, if they are not already, as part of the installation of |PROJECT_NAME|.
67
+ Python distribution platforms or Integrated Development Environments (IDEs) should also take care of this.
68
+ The optional dependencies, if any, must be installed independently by following the related instructions, for added functionalities of |PROJECT_NAME|.
69
+
70
+
71
+
72
+ Acknowledgments
73
+ ===============
74
+
75
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
76
+ :target: https://github.com/psf/black
77
+ .. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
78
+ :target: https://pycqa.github.io/isort/
79
+
80
+ The project is developed with `PyCharm Community <https://www.jetbrains.com/pycharm/>`_.
81
+
82
+ The code is formatted by `Black <https://github.com/psf/black/>`_, *The Uncompromising Code Formatter*.
83
+
84
+ The imports are ordered by `isort <https://github.com/timothycrosley/isort/>`_... *your imports, so you don't have to*.
85
+
86
+ ..
87
+ COPYRIGHT NOTICE
88
+
89
+ This software is governed by the CeCILL license under French law and
90
+ abiding by the rules of distribution of free software. You can use,
91
+ modify and/ or redistribute the software under the terms of the CeCILL
92
+ license as circulated by CEA, CNRS and INRIA at the following URL
93
+ "http://www.cecill.info".
94
+
95
+ As a counterpart to the access to the source code and rights to copy,
96
+ modify and redistribute granted by the license, users are provided only
97
+ with a limited warranty and the software's author, the holder of the
98
+ economic rights, and the successive licensors have only limited
99
+ liability.
100
+
101
+ In this respect, the user's attention is drawn to the risks associated
102
+ with loading, using, modifying and/or developing or reproducing the
103
+ software by the user in light of its specific status of free software,
104
+ that may mean that it is complicated to manipulate, and that also
105
+ therefore means that it is reserved for developers and experienced
106
+ professionals having in-depth computer knowledge. Users are therefore
107
+ encouraged to load and test the software's suitability as regards their
108
+ requirements in conditions enabling the security of their systems and/or
109
+ data to be ensured and, more generally, to use and operate it in the
110
+ same conditions as regards security.
111
+
112
+ The fact that you are presently reading this means that you have had
113
+ knowledge of the CeCILL license and that you accept its terms.
114
+
115
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
116
+
117
+ This software is being developed by Eric Debreuve, a CNRS employee and
118
+ member of team Morpheme.
119
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
120
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
121
+ I3S, and Laboratory iBV.
122
+
123
+ CNRS: https://www.cnrs.fr/index.php/en
124
+ Inria: https://www.inria.fr/en/
125
+ UniCA: https://univ-cotedazur.eu/
126
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
127
+ I3S: https://www.i3s.unice.fr/en/
128
+ iBV: http://ibv.unice.fr/
129
+ Team Morpheme: https://team.inria.fr/morpheme/
@@ -0,0 +1,74 @@
1
+ // Copyright CNRS/Inria/UniCA
2
+ // Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2022
3
+ // SEE COPYRIGHT NOTICE BELOW
4
+
5
+ :AUTHOR: Eric Debreuve
6
+ :EMAIL: eric.debreuve@cnrs.fr
7
+
8
+ :PROJECT_NAME: BabelPlot
9
+ :SHORT_DESCRIPTION: A Meta Plotting Library That Speaks Several Backends
10
+ :KEYWORDS: plot, library
11
+
12
+ :REPOSITORY_NAME: babelplot
13
+ :REPOSITORY_USER: eric.debreuve
14
+ :REPOSITORY_SITE: src.koda.cnrs.fr
15
+ :DOCUMENTATION_SITE: -/wikis/home
16
+ :SINCE_YEAR: 2022
17
+
18
+ :LICENSE_SHORT: CeCILL-2.1
19
+ :LICENCE_LONG: CEA CNRS Inria Logiciel Libre License, version 2.1
20
+ :PY_VERSION_MAJOR: 3
21
+ :PY_VERSION_MIN: 3.11
22
+
23
+ :PYPI_NAME: babelplot
24
+ :PYPI_TOPIC: Scientific/Engineering :: Visualization
25
+ :PYPI_AUDIENCE: Science/Research
26
+ :PYPI_STATUS: 3 - Alpha
27
+
28
+ :IMPORT_NAME: babelplot
29
+
30
+ :DEPENDENCIES_OPTIONAL: bokeh, gr, matplotlib, plotly, vedo
31
+
32
+ // COPYRIGHT NOTICE
33
+ //
34
+ // This software is governed by the CeCILL license under French law and
35
+ // abiding by the rules of distribution of free software. You can use,
36
+ // modify and/ or redistribute the software under the terms of the CeCILL
37
+ // license as circulated by CEA, CNRS and INRIA at the following URL
38
+ // "http://www.cecill.info".
39
+ //
40
+ // As a counterpart to the access to the source code and rights to copy,
41
+ // modify and redistribute granted by the license, users are provided only
42
+ // with a limited warranty and the software's author, the holder of the
43
+ // economic rights, and the successive licensors have only limited
44
+ // liability.
45
+ //
46
+ // In this respect, the user's attention is drawn to the risks associated
47
+ // with loading, using, modifying and/or developing or reproducing the
48
+ // software by the user in light of its specific status of free software,
49
+ // that may mean that it is complicated to manipulate, and that also
50
+ // therefore means that it is reserved for developers and experienced
51
+ // professionals having in-depth computer knowledge. Users are therefore
52
+ // encouraged to load and test the software's suitability as regards their
53
+ // requirements in conditions enabling the security of their systems and/or
54
+ // data to be ensured and, more generally, to use and operate it in the
55
+ // same conditions as regards security.
56
+ //
57
+ // The fact that you are presently reading this means that you have had
58
+ // knowledge of the CeCILL license and that you accept its terms.
59
+ //
60
+ // SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
61
+ //
62
+ // This software is being developed by Eric Debreuve, a CNRS employee and
63
+ // member of team Morpheme.
64
+ // Team Morpheme is a joint team between Inria, CNRS, and UniCA.
65
+ // It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
66
+ // I3S, and Laboratory iBV.
67
+ //
68
+ // CNRS: https://www.cnrs.fr/index.php/en
69
+ // Inria: https://www.inria.fr/en/
70
+ // UniCA: https://univ-cotedazur.eu/
71
+ // Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
72
+ // I3S: https://www.i3s.unice.fr/en/
73
+ // iBV: http://ibv.unice.fr/
74
+ // Team Morpheme: https://team.inria.fr/morpheme/
@@ -0,0 +1,70 @@
1
+ """
2
+ Copyright CNRS/Inria/UniCA
3
+ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2022
4
+ SEE COPYRIGHT NOTICE BELOW
5
+ """
6
+
7
+ try:
8
+ from beartype.claw import beartype_this_package # noqa
9
+ except ModuleNotFoundError:
10
+ pass
11
+ else:
12
+ import site
13
+ from pathlib import Path as path_t
14
+
15
+ paths = site.getsitepackages() + [site.getusersitepackages()]
16
+ folder = path_t(__file__).parent
17
+ if folder not in paths:
18
+ beartype_this_package()
19
+
20
+ from babelplot.backend.specification.backend import backend_e
21
+ from babelplot.main import NewFigure, NewPlot
22
+ from babelplot.specification.plot import plot_e
23
+ from babelplot.type.figure import ShowAllFigures
24
+ from babelplot.version import __version__
25
+
26
+ """
27
+ COPYRIGHT NOTICE
28
+
29
+ This software is governed by the CeCILL license under French law and
30
+ abiding by the rules of distribution of free software. You can use,
31
+ modify and/ or redistribute the software under the terms of the CeCILL
32
+ license as circulated by CEA, CNRS and INRIA at the following URL
33
+ "http://www.cecill.info".
34
+
35
+ As a counterpart to the access to the source code and rights to copy,
36
+ modify and redistribute granted by the license, users are provided only
37
+ with a limited warranty and the software's author, the holder of the
38
+ economic rights, and the successive licensors have only limited
39
+ liability.
40
+
41
+ In this respect, the user's attention is drawn to the risks associated
42
+ with loading, using, modifying and/or developing or reproducing the
43
+ software by the user in light of its specific status of free software,
44
+ that may mean that it is complicated to manipulate, and that also
45
+ therefore means that it is reserved for developers and experienced
46
+ professionals having in-depth computer knowledge. Users are therefore
47
+ encouraged to load and test the software's suitability as regards their
48
+ requirements in conditions enabling the security of their systems and/or
49
+ data to be ensured and, more generally, to use and operate it in the
50
+ same conditions as regards security.
51
+
52
+ The fact that you are presently reading this means that you have had
53
+ knowledge of the CeCILL license and that you accept its terms.
54
+
55
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
56
+
57
+ This software is being developed by Eric Debreuve, a CNRS employee and
58
+ member of team Morpheme.
59
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
60
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
61
+ I3S, and Laboratory iBV.
62
+
63
+ CNRS: https://www.cnrs.fr/index.php/en
64
+ Inria: https://www.inria.fr/en/
65
+ UniCA: https://univ-cotedazur.eu/
66
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
67
+ I3S: https://www.i3s.unice.fr/en/
68
+ iBV: http://ibv.unice.fr/
69
+ Team Morpheme: https://team.inria.fr/morpheme/
70
+ """
@@ -0,0 +1,172 @@
1
+ """
2
+ Copyright CNRS/Inria/UniCA
3
+ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2022
4
+ SEE COPYRIGHT NOTICE BELOW
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import typing as h
10
+
11
+ from babelplot.backend.specification.backend import backend_e
12
+ from babelplot.specification.dimension import dim_e
13
+ from babelplot.specification.plot import PlotsFromTemplate, plot_e, plot_type_h
14
+ from babelplot.task.show_pyqt6 import Show
15
+ from babelplot.type.figure import figure_t as base_figure_t
16
+ from babelplot.type.frame import frame_t as base_frame_t
17
+ from babelplot.type.plot import plot_t as base_plot_t
18
+ from bokeh.embed import file_html as HTMLofBackendContent # noqa
19
+ from bokeh.layouts import LayoutDOM as backend_content_t # noqa
20
+ from bokeh.layouts import column as NewBackendColLayout # noqa
21
+ from bokeh.layouts import grid as NewBackendGridLayout # noqa
22
+ from bokeh.layouts import row as NewBackendRowLayout # noqa
23
+ from bokeh.models.renderers import GlyphRenderer as backend_plot_t # noqa
24
+ from bokeh.plotting import figure as backend_figure_t # noqa
25
+ from bokeh.resources import INLINE # noqa
26
+
27
+ NAME = backend_e.BOKEH.value
28
+
29
+
30
+ backend_frame_t = backend_figure_t
31
+
32
+
33
+ def _NewPlot(
34
+ frame: backend_frame_t,
35
+ type_: plot_type_h | type[backend_plot_t],
36
+ plot_function: (
37
+ type[backend_plot_t] | h.Callable[..., backend_plot_t | h.Any] | None
38
+ ),
39
+ *args,
40
+ title: str | None = None, # If _, then it is swallowed by kwargs!
41
+ **kwargs,
42
+ ) -> tuple[
43
+ backend_plot_t | h.Any,
44
+ type[backend_plot_t] | h.Callable[..., backend_plot_t | h.Any],
45
+ ]:
46
+ """"""
47
+ if plot_function is None:
48
+ if hasattr(backend_frame_t, type_):
49
+ plot_function = getattr(backend_frame_t, type_)
50
+ else:
51
+ raise ValueError(f"{type_}: Unknown {NAME} graph object.")
52
+
53
+ return plot_function(frame, *args, **kwargs), plot_function
54
+
55
+
56
+ def _NewFrame(
57
+ _: backend_figure_t,
58
+ __: int,
59
+ ___: int,
60
+ *args,
61
+ title: str | None = None,
62
+ dim: dim_e = dim_e.XY, # If _, then it is swallowed by kwargs!
63
+ **kwargs,
64
+ ) -> backend_frame_t:
65
+ """"""
66
+ return backend_frame_t(*args, title=title, **kwargs)
67
+
68
+
69
+ def _AdjustLayout(figure: figure_t, /) -> None:
70
+ """"""
71
+ n_rows, n_cols = figure.shape
72
+ arranged_frames = [n_cols * [None] for _ in range(n_rows)]
73
+ for frame, (row, col) in zip(figure.frames, figure.locations):
74
+ arranged_frames[row][col] = frame.backend
75
+ arranged_frames: list[list[backend_frame_t]]
76
+
77
+ if n_rows > 1:
78
+ if n_cols > 1:
79
+ layout = NewBackendGridLayout(arranged_frames)
80
+ else:
81
+ column = [_row[0] for _row in arranged_frames]
82
+ layout = NewBackendColLayout(column)
83
+ else:
84
+ layout = NewBackendRowLayout(arranged_frames[0])
85
+
86
+ figure.layout = layout
87
+
88
+
89
+ def _AsHTML(figure: figure_t, /) -> str:
90
+ """"""
91
+
92
+ return HTMLofBackendContent(figure.layout, INLINE)
93
+
94
+
95
+ # noinspection PyTypeChecker
96
+ plot_t: type[base_plot_t] = type("plot_t", (base_plot_t,), {})
97
+ # noinspection PyTypeChecker
98
+ frame_t: type[base_frame_t] = type(
99
+ "frame_t",
100
+ (base_frame_t,),
101
+ {"plot_class": plot_t, "NewBackendPlot": staticmethod(_NewPlot)},
102
+ )
103
+ # noinspection PyTypeChecker
104
+ figure_t: type[base_figure_t] = type(
105
+ "figure_t",
106
+ (base_figure_t,),
107
+ {
108
+ "frame_class": frame_t,
109
+ "NewBackendFigure": backend_figure_t,
110
+ "NewBackendFrame": staticmethod(_NewFrame),
111
+ "AdjustLayout": _AdjustLayout,
112
+ "BackendShow": Show,
113
+ "layout": None,
114
+ "AsHTML": _AsHTML,
115
+ },
116
+ )
117
+
118
+
119
+ PLOTS = PlotsFromTemplate()
120
+ PLOTS[plot_e.SCATTER][1] = backend_frame_t.scatter
121
+
122
+
123
+ TRANSLATIONS = {
124
+ "color_face": "fill_color",
125
+ }
126
+
127
+
128
+ """
129
+ COPYRIGHT NOTICE
130
+
131
+ This software is governed by the CeCILL license under French law and
132
+ abiding by the rules of distribution of free software. You can use,
133
+ modify and/ or redistribute the software under the terms of the CeCILL
134
+ license as circulated by CEA, CNRS and INRIA at the following URL
135
+ "http://www.cecill.info".
136
+
137
+ As a counterpart to the access to the source code and rights to copy,
138
+ modify and redistribute granted by the license, users are provided only
139
+ with a limited warranty and the software's author, the holder of the
140
+ economic rights, and the successive licensors have only limited
141
+ liability.
142
+
143
+ In this respect, the user's attention is drawn to the risks associated
144
+ with loading, using, modifying and/or developing or reproducing the
145
+ software by the user in light of its specific status of free software,
146
+ that may mean that it is complicated to manipulate, and that also
147
+ therefore means that it is reserved for developers and experienced
148
+ professionals having in-depth computer knowledge. Users are therefore
149
+ encouraged to load and test the software's suitability as regards their
150
+ requirements in conditions enabling the security of their systems and/or
151
+ data to be ensured and, more generally, to use and operate it in the
152
+ same conditions as regards security.
153
+
154
+ The fact that you are presently reading this means that you have had
155
+ knowledge of the CeCILL license and that you accept its terms.
156
+
157
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
158
+
159
+ This software is being developed by Eric Debreuve, a CNRS employee and
160
+ member of team Morpheme.
161
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
162
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
163
+ I3S, and Laboratory iBV.
164
+
165
+ CNRS: https://www.cnrs.fr/index.php/en
166
+ Inria: https://www.inria.fr/en/
167
+ UniCA: https://univ-cotedazur.eu/
168
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
169
+ I3S: https://www.i3s.unice.fr/en/
170
+ iBV: http://ibv.unice.fr/
171
+ Team Morpheme: https://team.inria.fr/morpheme/
172
+ """