adopt-plot 0.0.4__tar.gz → 0.0.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adopt-plot
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: A universal plotter for implicit functions using adaptive engine selection.
5
5
  Author: VartRusData
6
6
  License: BSD 3-Clause
@@ -57,6 +57,22 @@ plot = AdoptPlot("y = 1/x", show=False)
57
57
  plot.ax.set_xlim(-10, 10) # Change X-axis limits
58
58
  plot.fig.savefig("my_plot.png", dpi=300)# Save to file
59
59
  ```
60
+ ![my_plot](https://i.yapx.ru/eCFD2.png)
61
+ ```python
62
+ from adopt_plot import AdoptPlot
63
+
64
+ plot = AdoptPlot("sin(sqrt(x**2 + y**2)) / log(x**2 + y**2 + 1) = 0", show=False)
65
+
66
+ # Подкручиваем стиль под публикацию
67
+ plot.ax.set_title("Implicit function with radial oscillations")
68
+ plot.ax.grid(True, linestyle=':', alpha=0.5)
69
+
70
+ # Сохраняем с высоким DPI
71
+ plot.fig.savefig("publication_ready.png", dpi=300, bbox_inches='tight')
72
+ plot.show()
73
+ ```
74
+ ![Сложная функция](https://i.yapx.ru/eCFBo.png) Сложная функция построенная через AdoptPlot
75
+
60
76
  ## Parameters
61
77
 
62
78
  When creating an `AdoptPlot` object, the following parameters are available:
@@ -42,6 +42,22 @@ plot = AdoptPlot("y = 1/x", show=False)
42
42
  plot.ax.set_xlim(-10, 10) # Change X-axis limits
43
43
  plot.fig.savefig("my_plot.png", dpi=300)# Save to file
44
44
  ```
45
+ ![my_plot](https://i.yapx.ru/eCFD2.png)
46
+ ```python
47
+ from adopt_plot import AdoptPlot
48
+
49
+ plot = AdoptPlot("sin(sqrt(x**2 + y**2)) / log(x**2 + y**2 + 1) = 0", show=False)
50
+
51
+ # Подкручиваем стиль под публикацию
52
+ plot.ax.set_title("Implicit function with radial oscillations")
53
+ plot.ax.grid(True, linestyle=':', alpha=0.5)
54
+
55
+ # Сохраняем с высоким DPI
56
+ plot.fig.savefig("publication_ready.png", dpi=300, bbox_inches='tight')
57
+ plot.show()
58
+ ```
59
+ ![Сложная функция](https://i.yapx.ru/eCFBo.png) Сложная функция построенная через AdoptPlot
60
+
45
61
  ## Parameters
46
62
 
47
63
  When creating an `AdoptPlot` object, the following parameters are available:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "adopt-plot"
7
- version = "0.0.4"
7
+ version = "0.0.5"
8
8
  description = "A universal plotter for implicit functions using adaptive engine selection."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -20,4 +20,8 @@ classifiers = [
20
20
  ]
21
21
  [tool.setuptools]
22
22
  packages = ["adopt_plot"]
23
- package-dir = {"" = "src"}
23
+ package-dir = {"" = "src"}
24
+
25
+ [tool.pytest.ini_options]
26
+ testpaths = ["tests", "."] # <-- точка "." означает "ищи также в корне"
27
+ python_files = ["test_*.py", "*_test.py", "test.py"]
@@ -75,7 +75,7 @@ def insert_multiplication_signs(expr: str, extra_functions=None) -> str:
75
75
 
76
76
  from typing import Literal, Optional, Tuple
77
77
 
78
- class AdoptPlot():
78
+ class AdoptPlot:
79
79
  def __init__(self,
80
80
  expr: str,
81
81
  lib: Literal['contour', 'implicit', None] = None,
@@ -262,6 +262,7 @@ class AdoptPlot():
262
262
  # === 2. Увеличиваем разрешение для гладкости (было 500, стало 1000) ===
263
263
  if self.lib == 'implicit' or (has_odz(expr, var1) and self.lib is None):
264
264
  from sympy.plotting import plot_implicit
265
+ self.current_engine = 'implicit'
265
266
  if isinstance(self.limit, (int, float)):
266
267
  self.p = plot_implicit(self.eq, (var1, -self.limit, self.limit), (var2, -self.limit, self.limit), show=False, n=self.n, depth=self.depth, line_color=self.color)
267
268
  elif isinstance(self.limit, tuple):
@@ -347,6 +348,7 @@ class AdoptPlot():
347
348
 
348
349
  return
349
350
  else:
351
+ self.current_engine = 'contour'
350
352
  if isinstance(self.limit, (float, int)):
351
353
 
352
354
  x_vals = np.linspace(-self.limit, self.limit, self.n)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adopt-plot
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: A universal plotter for implicit functions using adaptive engine selection.
5
5
  Author: VartRusData
6
6
  License: BSD 3-Clause
@@ -57,6 +57,22 @@ plot = AdoptPlot("y = 1/x", show=False)
57
57
  plot.ax.set_xlim(-10, 10) # Change X-axis limits
58
58
  plot.fig.savefig("my_plot.png", dpi=300)# Save to file
59
59
  ```
60
+ ![my_plot](https://i.yapx.ru/eCFD2.png)
61
+ ```python
62
+ from adopt_plot import AdoptPlot
63
+
64
+ plot = AdoptPlot("sin(sqrt(x**2 + y**2)) / log(x**2 + y**2 + 1) = 0", show=False)
65
+
66
+ # Подкручиваем стиль под публикацию
67
+ plot.ax.set_title("Implicit function with radial oscillations")
68
+ plot.ax.grid(True, linestyle=':', alpha=0.5)
69
+
70
+ # Сохраняем с высоким DPI
71
+ plot.fig.savefig("publication_ready.png", dpi=300, bbox_inches='tight')
72
+ plot.show()
73
+ ```
74
+ ![Сложная функция](https://i.yapx.ru/eCFBo.png) Сложная функция построенная через AdoptPlot
75
+
60
76
  ## Parameters
61
77
 
62
78
  When creating an `AdoptPlot` object, the following parameters are available:
File without changes
File without changes