plotez 0.1.0__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.
plotez-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Syed Ali Mohsin Bukhari
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
plotez-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,200 @@
1
+ Metadata-Version: 2.4
2
+ Name: plotez
3
+ Version: 0.1.0
4
+ Summary: Mundane plotting done easy.
5
+ Author-email: Syed Ali Mohsin Bukhari <ali.mohsin@ist.edu.pk>
6
+ Project-URL: Issues, https://github.com/syedalimohsinbukhari/plotez/issues
7
+ Project-URL: Repository, https://github.com/syedalimohsinbukhari/plotez/
8
+ Keywords: plotting,visualization,data visualization,matplotlib,python plotting
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: matplotlib
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest; extra == "dev"
15
+ Requires-Dist: pytest-cov; extra == "dev"
16
+ Requires-Dist: mypy; extra == "dev"
17
+ Requires-Dist: sphinx; extra == "dev"
18
+ Requires-Dist: sphinx-rtd-theme; extra == "dev"
19
+ Requires-Dist: black; extra == "dev"
20
+ Dynamic: license-file
21
+
22
+ # plotEZ
23
+
24
+ **Mundane plotting made easy.**
25
+
26
+ `plotez` is a Python library that simplifies common matplotlib plotting tasks with an intuitive API. Create complex plots
27
+ with minimal boilerplate code.
28
+
29
+ ## Features
30
+
31
+ - **Simple API**: Create complex plots with just a few lines of code
32
+ - **Dual-Axis Support**: Easy creation of dual y-axis or dual x-axis plots
33
+ - **Multi-Panel Layouts**: Flexible subplot arrangements with automatic labeling
34
+ - **File Integration**: Direct plotting from CSV files
35
+ - **Extensive Customization**: Full control over plot appearance via parameter classes
36
+ - **Type Safety**: Complete type hints for better IDE support and type checking (PEP 561 compliant)
37
+ - **Well Tested**: Comprehensive test suite with 85%+ coverage
38
+
39
+ ## Installation
40
+
41
+ ### From PyPI (once published)
42
+
43
+ ```bash
44
+ pip install plotez
45
+ ```
46
+
47
+ ### From Source
48
+
49
+ ```bash
50
+ git clone https://github.com/syedalimohsinbukhari/plotez.git
51
+ cd plotez
52
+ pip install -e .
53
+ ```
54
+
55
+ ### Development Installation
56
+
57
+ ```bash
58
+ pip install -e ".[dev]"
59
+ ```
60
+
61
+ ## Quick Start
62
+
63
+ ```python
64
+ import numpy as np
65
+ from plotez import plot_xy
66
+
67
+ # Generate data
68
+ x = np.linspace(0, 10, 100)
69
+ y = np.sin(x)
70
+
71
+ # Create a plot with automatic labeling
72
+ plot_xy(x, y, auto_label=True)
73
+ ```
74
+
75
+ ![Example1 Plot](examplesNimages/README_example1.png)
76
+
77
+ ## Examples
78
+
79
+ ### Dual Y-Axis Plot
80
+
81
+ ```python
82
+ import numpy as np
83
+ from plotez import plot_xyy
84
+
85
+ x = np.linspace(0, 10, 100)
86
+ y1 = np.sin(x)
87
+ y2 = np.exp(x / 10)
88
+
89
+ plot_xyy(
90
+ x, y1, y2,
91
+ x_label='Time',
92
+ y1_label='Sine',
93
+ y2_label='Exponential',
94
+ data_labels=['sin(x)', 'exp(x/10)'],
95
+ plot_title='Dual Y-Axis Example',
96
+ use_twin_x=True
97
+ )
98
+ ```
99
+
100
+ ![Example2 Plot](examplesNimages/README_example2.png)
101
+
102
+ ### Multi-Panel Plots
103
+
104
+ ```python
105
+ import numpy as np
106
+ from plotez import n_plotter
107
+
108
+ # Create 2×2 grid
109
+ x_data = [np.linspace(0, 10, 100) for _ in range(4)]
110
+ y_data = [
111
+ np.sin(x_data[0]),
112
+ np.cos(x_data[1]),
113
+ np.tan(x_data[2] / 5),
114
+ x_data[3]**2 / 100
115
+ ]
116
+
117
+ fig, axs = n_plotter(
118
+ x_data, y_data,
119
+ n_rows=2, n_cols=2,
120
+ auto_label=True
121
+ )
122
+ ```
123
+
124
+ ![Example3 Plot](examplesNimages/README_example3.png)
125
+
126
+ ### Custom Styling
127
+
128
+ ```python
129
+ import numpy as np
130
+ from plotez import plot_xy
131
+ from plotez.backend.utilities import LinePlot
132
+
133
+ x = np.linspace(0, 10, 100)
134
+ y = np.sin(x)
135
+
136
+ # Create custom line plot parameters
137
+ line_params = LinePlot(
138
+ line_style=['-'],
139
+ line_width=[2],
140
+ color=['#FF5733'],
141
+ marker=['o'],
142
+ marker_size=[4]
143
+ )
144
+
145
+ plot_xy(x, y, plot_dictionary=line_params)
146
+ ```
147
+
148
+ ![Example4 Plot](examplesNimages/README_example4.png)
149
+
150
+ ## Development
151
+
152
+ ### Running Tests
153
+
154
+ ```bash
155
+ pytest
156
+ ```
157
+
158
+ ### With Coverage Report
159
+
160
+ ```bash
161
+ pytest --cov=src/plotez --cov-report=html
162
+ ```
163
+
164
+ ### Type Checking
165
+
166
+ ```bash
167
+ mypy src/plotez
168
+ ```
169
+
170
+ ### Building Documentation
171
+
172
+ ```bash
173
+ cd docs
174
+ make html
175
+ ```
176
+
177
+ ## Project Status
178
+
179
+ - Type hints are corrected throughout the codebase
180
+ - Test suite implemented (80%+ coverage)
181
+ - Documentation structure created
182
+ - Development tools configured (pytest, mypy, sphinx)
183
+ - PEP 561 compliance (py.typed marker)
184
+
185
+ ## Contributing
186
+
187
+ Contributions are welcome! Please feel free to submit a Pull Request.
188
+
189
+ ## License
190
+
191
+ MIT License – see [LICENSE](LICENSE) file for details.
192
+
193
+ ## Authors
194
+
195
+ - Syed Ali Mohsin Bukhari - [ali.mohsin@ist.edu.pk](mailto:ali.mohsin@ist.edu.pk)
196
+
197
+ ## Links
198
+
199
+ - **Repository**: https://github.com/syedalimohsinbukhari/plotez
200
+ - **Issues**: https://github.com/syedalimohsinbukhari/plotez/issues
plotez-0.1.0/README.md ADDED
@@ -0,0 +1,179 @@
1
+ # plotEZ
2
+
3
+ **Mundane plotting made easy.**
4
+
5
+ `plotez` is a Python library that simplifies common matplotlib plotting tasks with an intuitive API. Create complex plots
6
+ with minimal boilerplate code.
7
+
8
+ ## Features
9
+
10
+ - **Simple API**: Create complex plots with just a few lines of code
11
+ - **Dual-Axis Support**: Easy creation of dual y-axis or dual x-axis plots
12
+ - **Multi-Panel Layouts**: Flexible subplot arrangements with automatic labeling
13
+ - **File Integration**: Direct plotting from CSV files
14
+ - **Extensive Customization**: Full control over plot appearance via parameter classes
15
+ - **Type Safety**: Complete type hints for better IDE support and type checking (PEP 561 compliant)
16
+ - **Well Tested**: Comprehensive test suite with 85%+ coverage
17
+
18
+ ## Installation
19
+
20
+ ### From PyPI (once published)
21
+
22
+ ```bash
23
+ pip install plotez
24
+ ```
25
+
26
+ ### From Source
27
+
28
+ ```bash
29
+ git clone https://github.com/syedalimohsinbukhari/plotez.git
30
+ cd plotez
31
+ pip install -e .
32
+ ```
33
+
34
+ ### Development Installation
35
+
36
+ ```bash
37
+ pip install -e ".[dev]"
38
+ ```
39
+
40
+ ## Quick Start
41
+
42
+ ```python
43
+ import numpy as np
44
+ from plotez import plot_xy
45
+
46
+ # Generate data
47
+ x = np.linspace(0, 10, 100)
48
+ y = np.sin(x)
49
+
50
+ # Create a plot with automatic labeling
51
+ plot_xy(x, y, auto_label=True)
52
+ ```
53
+
54
+ ![Example1 Plot](examplesNimages/README_example1.png)
55
+
56
+ ## Examples
57
+
58
+ ### Dual Y-Axis Plot
59
+
60
+ ```python
61
+ import numpy as np
62
+ from plotez import plot_xyy
63
+
64
+ x = np.linspace(0, 10, 100)
65
+ y1 = np.sin(x)
66
+ y2 = np.exp(x / 10)
67
+
68
+ plot_xyy(
69
+ x, y1, y2,
70
+ x_label='Time',
71
+ y1_label='Sine',
72
+ y2_label='Exponential',
73
+ data_labels=['sin(x)', 'exp(x/10)'],
74
+ plot_title='Dual Y-Axis Example',
75
+ use_twin_x=True
76
+ )
77
+ ```
78
+
79
+ ![Example2 Plot](examplesNimages/README_example2.png)
80
+
81
+ ### Multi-Panel Plots
82
+
83
+ ```python
84
+ import numpy as np
85
+ from plotez import n_plotter
86
+
87
+ # Create 2×2 grid
88
+ x_data = [np.linspace(0, 10, 100) for _ in range(4)]
89
+ y_data = [
90
+ np.sin(x_data[0]),
91
+ np.cos(x_data[1]),
92
+ np.tan(x_data[2] / 5),
93
+ x_data[3]**2 / 100
94
+ ]
95
+
96
+ fig, axs = n_plotter(
97
+ x_data, y_data,
98
+ n_rows=2, n_cols=2,
99
+ auto_label=True
100
+ )
101
+ ```
102
+
103
+ ![Example3 Plot](examplesNimages/README_example3.png)
104
+
105
+ ### Custom Styling
106
+
107
+ ```python
108
+ import numpy as np
109
+ from plotez import plot_xy
110
+ from plotez.backend.utilities import LinePlot
111
+
112
+ x = np.linspace(0, 10, 100)
113
+ y = np.sin(x)
114
+
115
+ # Create custom line plot parameters
116
+ line_params = LinePlot(
117
+ line_style=['-'],
118
+ line_width=[2],
119
+ color=['#FF5733'],
120
+ marker=['o'],
121
+ marker_size=[4]
122
+ )
123
+
124
+ plot_xy(x, y, plot_dictionary=line_params)
125
+ ```
126
+
127
+ ![Example4 Plot](examplesNimages/README_example4.png)
128
+
129
+ ## Development
130
+
131
+ ### Running Tests
132
+
133
+ ```bash
134
+ pytest
135
+ ```
136
+
137
+ ### With Coverage Report
138
+
139
+ ```bash
140
+ pytest --cov=src/plotez --cov-report=html
141
+ ```
142
+
143
+ ### Type Checking
144
+
145
+ ```bash
146
+ mypy src/plotez
147
+ ```
148
+
149
+ ### Building Documentation
150
+
151
+ ```bash
152
+ cd docs
153
+ make html
154
+ ```
155
+
156
+ ## Project Status
157
+
158
+ - Type hints are corrected throughout the codebase
159
+ - Test suite implemented (80%+ coverage)
160
+ - Documentation structure created
161
+ - Development tools configured (pytest, mypy, sphinx)
162
+ - PEP 561 compliance (py.typed marker)
163
+
164
+ ## Contributing
165
+
166
+ Contributions are welcome! Please feel free to submit a Pull Request.
167
+
168
+ ## License
169
+
170
+ MIT License – see [LICENSE](LICENSE) file for details.
171
+
172
+ ## Authors
173
+
174
+ - Syed Ali Mohsin Bukhari - [ali.mohsin@ist.edu.pk](mailto:ali.mohsin@ist.edu.pk)
175
+
176
+ ## Links
177
+
178
+ - **Repository**: https://github.com/syedalimohsinbukhari/plotez
179
+ - **Issues**: https://github.com/syedalimohsinbukhari/plotez/issues
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = ["setuptools", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "plotez"
7
+ description = "Mundane plotting done easy."
8
+ authors = [{ name = "Syed Ali Mohsin Bukhari", email = "ali.mohsin@ist.edu.pk" }]
9
+
10
+ readme = { file = "README.md", content-type = "text/markdown" }
11
+ requires-python = ">=3.10"
12
+ license-files = ["LICENSE"]
13
+ dynamic = ["version"]
14
+ dependencies = ["matplotlib"]
15
+ keywords = ["plotting", "visualization", "data visualization", "matplotlib", "python plotting"]
16
+
17
+ [tool.setuptools.dynamic]
18
+ version = { attr = "plotez.version.__version__" }
19
+
20
+ [tool.your_package.contacts]
21
+ emails = ["ali.mohsin@ist.edu.pk", "syedali.b+github@outlook.com"]
22
+
23
+ [project.optional-dependencies]
24
+ dev = ["pytest", "pytest-cov", "mypy", "sphinx", "sphinx-rtd-theme", "black"]
25
+
26
+ [project.urls]
27
+ #Homepage = "https://readthedocs.pymultifit.com"
28
+ Issues = "https://github.com/syedalimohsinbukhari/plotez/issues"
29
+ Repository = "https://github.com/syedalimohsinbukhari/plotez/"
30
+
31
+
32
+ [tool.setuptools]
33
+ package-dir = { "" = "src" }
34
+
35
+ [tool.setuptools.packages.find]
36
+ where = ["src"]
37
+ exclude = ["examplesNimages", "examples", "*tests*"]
plotez-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,25 @@
1
+ """
2
+ PlotEZ - Mundane plotting made easy.
3
+
4
+ A Python library for simplified matplotlib plotting.
5
+ """
6
+
7
+ from .plotez import (
8
+ n_plotter,
9
+ plot_two_column_file,
10
+ plot_with_dual_axes,
11
+ plot_xy,
12
+ plot_xyy,
13
+ two_subplots,
14
+ )
15
+ from .version import __version__
16
+
17
+ __all__ = [
18
+ "plot_two_column_file",
19
+ "plot_xy",
20
+ "plot_xyy",
21
+ "plot_with_dual_axes",
22
+ "two_subplots",
23
+ "n_plotter",
24
+ "__version__",
25
+ ]
@@ -0,0 +1 @@
1
+ """Created on Jul 20 00:17:08 2022."""
@@ -0,0 +1,46 @@
1
+ """
2
+ PlotEZ Error Handling.
3
+
4
+ Custom exceptions for plotting operations.
5
+ """
6
+
7
+
8
+ class PlotError(Exception):
9
+ """
10
+ Base class for exceptions related to plotting operations.
11
+
12
+ Notes
13
+ -----
14
+ This serves as the parent class for all plotting-related errors.
15
+ Specific exceptions related to plot configuration or data issues
16
+ should inherit from this class.
17
+ """
18
+
19
+ pass
20
+
21
+
22
+ class NoXYLabels(PlotError):
23
+ """
24
+ Raised when x or y labels are missing in a plot.
25
+
26
+ Notes
27
+ -----
28
+ This error occurs when a plot is expected to have labels for both
29
+ the x-axis and y-axis, but one or both are missing. Proper labeling
30
+ is often required for clarity in visualizations.
31
+ """
32
+
33
+ pass
34
+
35
+
36
+ class OrientationError(PlotError):
37
+ """
38
+ Raised when an invalid or unexpected orientation is used in a plot.
39
+
40
+ Notes
41
+ -----
42
+ This error occurs when the orientation parameter for a plot is set
43
+ incorrectly or does not match the expected format.
44
+ """
45
+
46
+ pass