plot-misc 2.0.3__tar.gz → 2.0.4__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 (45) hide show
  1. plot_misc-2.0.4/MANIFEST.in +16 -0
  2. {plot_misc-2.0.3 → plot_misc-2.0.4}/PKG-INFO +19 -10
  3. {plot_misc-2.0.3 → plot_misc-2.0.4}/README.md +1 -1
  4. plot_misc-2.0.4/plot_misc/_version.py +1 -0
  5. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/barchart.py +22 -14
  6. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc.egg-info/PKG-INFO +19 -10
  7. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc.egg-info/SOURCES.txt +3 -0
  8. plot_misc-2.0.4/plot_misc.egg-info/requires.txt +19 -0
  9. {plot_misc-2.0.3 → plot_misc-2.0.4}/pyproject.toml +9 -13
  10. plot_misc-2.0.4/requirements-dev.txt +9 -0
  11. plot_misc-2.0.4/requirements.txt +9 -0
  12. plot_misc-2.0.3/plot_misc/_version.py +0 -1
  13. plot_misc-2.0.3/plot_misc.egg-info/requires.txt +0 -11
  14. {plot_misc-2.0.3 → plot_misc-2.0.4}/LICENSE +0 -0
  15. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/__init__.py +0 -0
  16. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/constants.py +0 -0
  17. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/errors.py +0 -0
  18. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/__init__.py +0 -0
  19. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/bar_points.tsv.gz +0 -0
  20. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/barchart.tsv.gz +0 -0
  21. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/calibration_bins.tsv.gz +0 -0
  22. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/calibration_data.tsv.gz +0 -0
  23. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/forest_data.tsv.gz +0 -0
  24. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/group_bar.tsv.gz +0 -0
  25. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/heatmap_data.tsv.gz +0 -0
  26. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/incidence_matrix_data.tsv.gz +0 -0
  27. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/lollipop_data.tsv.gz +0 -0
  28. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/mace_associations.tsv.gz +0 -0
  29. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/net_benefit.tsv.gz +0 -0
  30. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/string_data.txt +0 -0
  31. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/example_datasets/volcano.tsv.gz +0 -0
  32. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/example_data/examples.py +0 -0
  33. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/forest.py +0 -0
  34. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/heatmap.py +0 -0
  35. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/incidencematrix.py +0 -0
  36. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/machine_learning.py +0 -0
  37. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/piechart.py +0 -0
  38. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/utils/__init__.py +0 -0
  39. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/utils/colour.py +0 -0
  40. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/utils/formatting.py +0 -0
  41. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/utils/utils.py +0 -0
  42. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc/volcano.py +0 -0
  43. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc.egg-info/dependency_links.txt +0 -0
  44. {plot_misc-2.0.3 → plot_misc-2.0.4}/plot_misc.egg-info/top_level.txt +0 -0
  45. {plot_misc-2.0.3 → plot_misc-2.0.4}/setup.cfg +0 -0
@@ -0,0 +1,16 @@
1
+ # include top-level metadata
2
+ include README.md LICENSE
3
+ include requirements.txt
4
+ include requirements-dev.txt
5
+
6
+ # ship the example datasets explicitly
7
+ recursive-include plot_misc/example_data/example_datasets *.tsv.gz *.txt
8
+
9
+ # drop these
10
+ prune tests
11
+ prune resources
12
+
13
+ # drop the rest
14
+ global-exclude .*
15
+ global-exclude *.py[cod]
16
+ global-exclude __pycache__/*
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plot-misc
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Various plotting templates built on top of matplotlib
5
5
  Author-email: A Floriaan Schmidt <floriaanschmidt@gmail.com>
6
6
  License-Expression: GPL-3.0-or-later
7
7
  Project-URL: Homepage, https://gitlab.com/SchmidtAF/plot-misc
8
+ Project-URL: Documentation, https://schmidtaf.gitlab.io/plot-misc/
8
9
  Classifier: Programming Language :: Python
9
10
  Classifier: Programming Language :: Python :: 3
10
11
  Classifier: Programming Language :: Python :: 3.10
@@ -14,20 +15,28 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
14
15
  Requires-Python: <3.13,>=3.10
15
16
  Description-Content-Type: text/markdown
16
17
  License-File: LICENSE
17
- Requires-Dist: numpy
18
- Requires-Dist: pandas
19
- Requires-Dist: matplotlib
20
- Requires-Dist: seaborn
21
- Requires-Dist: scipy
22
- Requires-Dist: scikit-learn
23
- Requires-Dist: adjustText
18
+ Requires-Dist: pandas>=1.3
19
+ Requires-Dist: numpy>=1.21
20
+ Requires-Dist: matplotlib>=3.5
21
+ Requires-Dist: seaborn>=0.11
22
+ Requires-Dist: scipy>=1.5
23
+ Requires-Dist: statsmodels>=0.1
24
+ Requires-Dist: scikit-learn>=1.4
25
+ Requires-Dist: adjustText>=1.3
24
26
  Provides-Extra: dev
27
+ Requires-Dist: python-build; extra == "dev"
25
28
  Requires-Dist: twine; extra == "dev"
26
- Requires-Dist: build; extra == "dev"
29
+ Requires-Dist: setuptools; extra == "dev"
30
+ Requires-Dist: wheel; extra == "dev"
31
+ Requires-Dist: pytest>=6; extra == "dev"
32
+ Requires-Dist: pytest-mock>=3; extra == "dev"
33
+ Requires-Dist: pytest-dependency>=0.5; extra == "dev"
34
+ Requires-Dist: bump2version>=1; extra == "dev"
35
+ Requires-Dist: jupyter; extra == "dev"
27
36
  Dynamic: license-file
28
37
 
29
38
  # A collection of plotting functions
30
- __version__: `2.0.3`
39
+ __version__: `2.0.4`
31
40
 
32
41
  This repository collects plotting modules written on top of `matplotlib`.
33
42
  The functions are intended to set up light-touch, basic illustrations that
@@ -1,5 +1,5 @@
1
1
  # A collection of plotting functions
2
- __version__: `2.0.3`
2
+ __version__: `2.0.4`
3
3
 
4
4
  This repository collects plotting modules written on top of `matplotlib`.
5
5
  The functions are intended to set up light-touch, basic illustrations that
@@ -0,0 +1 @@
1
+ __version__ = '2.0.4'
@@ -83,6 +83,14 @@ def bar(data:pd.DataFrame, label:str, column:str,
83
83
  Matplotlib figure object.
84
84
  ax : plt.Axes
85
85
  Matplotlib axes with the rendered bar plot.
86
+
87
+ Notes
88
+ -----
89
+ This function is essentially a helper function for the more complicated
90
+ bar charts in this module and simply wraps matplotlib's bar function.
91
+ It is included as a public function to allow people to use the same
92
+ interface when working with plot-misc. If one is exclusively looking to
93
+ use `bar` it is advisable to simply revert to matplotlib's offering.
86
94
  """
87
95
  # check input
88
96
  is_df(data)
@@ -235,30 +243,30 @@ def stack_bar(data:pd.DataFrame, label:str, columns:list[str],
235
243
  'number of colours ({1}).'.format(
236
244
  len(columns), len(colours)))
237
245
  # get labels
238
- labels = data[label]
246
+ # labels = data[label]
239
247
  # get columns
240
248
  fields=columns
241
249
  # actual plotting
242
250
  left = len(data) * [0]
243
251
  for idx, name in enumerate(fields):
252
+ new_kwargs = _update_kwargs(update_dict=kwargs,
253
+ edgecolor=edgecolour,
254
+ color=colours[idx],
255
+ alpha=transparency,
256
+ )
244
257
  if horizontal == False:
245
- # plotting vertical bar chart
246
- new_kwargs = _update_kwargs(update_dict=kwargs,
247
- edgecolor=edgecolour,
248
- width=wd, color=colours[idx],
249
- alpha=transparency,
258
+ new_kwargs = _update_kwargs(new_kwargs, bottom=left,
250
259
  )
251
- ax.bar(labels, height=data[name], bottom=left, **new_kwargs,
252
- )
253
260
  else:
254
- # horizontal bar chart
255
- new_kwargs = _update_kwargs(update_dict=kwargs, edgecolor=edgecolour,
256
- height=wd, color=colours[idx],
257
- alpha=transparency,
261
+ new_kwargs = _update_kwargs(new_kwargs, left=left,
258
262
  )
259
- ax.barh(labels, width=data[name], left=left, **new_kwargs,
263
+ # The actual plotting
264
+ # NOTE adding wd here because it bar assigns it to either width or
265
+ # height depending on horizontal.
266
+ _, ax = bar(data=data, label=label, column=name, horizontal=horizontal,
267
+ wd=wd, ax=ax, kwargs_bar=new_kwargs,
260
268
  )
261
- # update the locations
269
+ # updating the coordinate where the last bar stops
262
270
  left = left + data[name]
263
271
  # removing spines
264
272
  ax.spines['right'].set_visible(False)
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plot-misc
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Various plotting templates built on top of matplotlib
5
5
  Author-email: A Floriaan Schmidt <floriaanschmidt@gmail.com>
6
6
  License-Expression: GPL-3.0-or-later
7
7
  Project-URL: Homepage, https://gitlab.com/SchmidtAF/plot-misc
8
+ Project-URL: Documentation, https://schmidtaf.gitlab.io/plot-misc/
8
9
  Classifier: Programming Language :: Python
9
10
  Classifier: Programming Language :: Python :: 3
10
11
  Classifier: Programming Language :: Python :: 3.10
@@ -14,20 +15,28 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
14
15
  Requires-Python: <3.13,>=3.10
15
16
  Description-Content-Type: text/markdown
16
17
  License-File: LICENSE
17
- Requires-Dist: numpy
18
- Requires-Dist: pandas
19
- Requires-Dist: matplotlib
20
- Requires-Dist: seaborn
21
- Requires-Dist: scipy
22
- Requires-Dist: scikit-learn
23
- Requires-Dist: adjustText
18
+ Requires-Dist: pandas>=1.3
19
+ Requires-Dist: numpy>=1.21
20
+ Requires-Dist: matplotlib>=3.5
21
+ Requires-Dist: seaborn>=0.11
22
+ Requires-Dist: scipy>=1.5
23
+ Requires-Dist: statsmodels>=0.1
24
+ Requires-Dist: scikit-learn>=1.4
25
+ Requires-Dist: adjustText>=1.3
24
26
  Provides-Extra: dev
27
+ Requires-Dist: python-build; extra == "dev"
25
28
  Requires-Dist: twine; extra == "dev"
26
- Requires-Dist: build; extra == "dev"
29
+ Requires-Dist: setuptools; extra == "dev"
30
+ Requires-Dist: wheel; extra == "dev"
31
+ Requires-Dist: pytest>=6; extra == "dev"
32
+ Requires-Dist: pytest-mock>=3; extra == "dev"
33
+ Requires-Dist: pytest-dependency>=0.5; extra == "dev"
34
+ Requires-Dist: bump2version>=1; extra == "dev"
35
+ Requires-Dist: jupyter; extra == "dev"
27
36
  Dynamic: license-file
28
37
 
29
38
  # A collection of plotting functions
30
- __version__: `2.0.3`
39
+ __version__: `2.0.4`
31
40
 
32
41
  This repository collects plotting modules written on top of `matplotlib`.
33
42
  The functions are intended to set up light-touch, basic illustrations that
@@ -1,6 +1,9 @@
1
1
  LICENSE
2
+ MANIFEST.in
2
3
  README.md
3
4
  pyproject.toml
5
+ requirements-dev.txt
6
+ requirements.txt
4
7
  plot_misc/__init__.py
5
8
  plot_misc/_version.py
6
9
  plot_misc/barchart.py
@@ -0,0 +1,19 @@
1
+ pandas>=1.3
2
+ numpy>=1.21
3
+ matplotlib>=3.5
4
+ seaborn>=0.11
5
+ scipy>=1.5
6
+ statsmodels>=0.1
7
+ scikit-learn>=1.4
8
+ adjustText>=1.3
9
+
10
+ [dev]
11
+ python-build
12
+ twine
13
+ setuptools
14
+ wheel
15
+ pytest>=6
16
+ pytest-mock>=3
17
+ pytest-dependency>=0.5
18
+ bump2version>=1
19
+ jupyter
@@ -4,22 +4,14 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "plot-misc"
7
- version = "2.0.3"
7
+ version = "2.0.4"
8
8
  description = "Various plotting templates built on top of matplotlib"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "A Floriaan Schmidt", email = "floriaanschmidt@gmail.com" }]
11
11
  license = "GPL-3.0-or-later"
12
12
  license-files = ["LICENSE"]
13
13
  requires-python = ">=3.10, <3.13"
14
- dependencies = [
15
- "numpy",
16
- "pandas",
17
- "matplotlib",
18
- "seaborn",
19
- "scipy",
20
- "scikit-learn",
21
- "adjustText"
22
- ]
14
+ dynamic = ["dependencies", "optional-dependencies"]
23
15
  classifiers = [
24
16
  "Programming Language :: Python",
25
17
  "Programming Language :: Python :: 3",
@@ -29,11 +21,15 @@ classifiers = [
29
21
  "Programming Language :: Python :: Implementation :: PyPy"
30
22
  ]
31
23
 
32
- [project.optional-dependencies]
33
- dev = ["twine", "build"]
34
-
35
24
  [project.urls]
36
25
  Homepage = "https://gitlab.com/SchmidtAF/plot-misc"
26
+ Documentation = "https://schmidtaf.gitlab.io/plot-misc/"
27
+
28
+ [tool.setuptools.dynamic]
29
+ dependencies = { file = ["requirements.txt"] }
30
+
31
+ [tool.setuptools.dynamic.optional-dependencies]
32
+ dev = { file = ["requirements-dev.txt"] }
37
33
 
38
34
  [tool.setuptools.packages.find]
39
35
  include = ["plot_misc*"]
@@ -0,0 +1,9 @@
1
+ python-build
2
+ twine
3
+ setuptools
4
+ wheel
5
+ pytest>=6
6
+ pytest-mock>=3
7
+ pytest-dependency>=0.5
8
+ bump2version>=1
9
+ jupyter
@@ -0,0 +1,9 @@
1
+ pandas>=1.3
2
+ numpy>=1.21
3
+ matplotlib>=3.5
4
+ seaborn>=0.11
5
+ scipy>=1.5
6
+ statsmodels>=0.1
7
+ scikit-learn>=1.4
8
+ adjustText>=1.3
9
+
@@ -1 +0,0 @@
1
- __version__ = '2.0.3'
@@ -1,11 +0,0 @@
1
- numpy
2
- pandas
3
- matplotlib
4
- seaborn
5
- scipy
6
- scikit-learn
7
- adjustText
8
-
9
- [dev]
10
- twine
11
- build
File without changes
File without changes
File without changes
File without changes