adopt-plot 0.0.5__tar.gz → 0.1.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.5
3
+ Version: 0.1.5
4
4
  Summary: A universal plotter for implicit functions using adaptive engine selection.
5
5
  Author: VartRusData
6
6
  License: BSD 3-Clause
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "adopt-plot"
7
- version = "0.0.5"
7
+ version = "0.1.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"
@@ -411,6 +411,17 @@ class AdoptPlot:
411
411
  p.show()
412
412
  def show(self):
413
413
  try:
414
- self.plt.show()
415
- except:
416
- raise PltNotFoundError("plt Not Found")
414
+ if hasattr(self, 'plt'):
415
+ self.plt.show()
416
+ else:
417
+ raise PltNotFoundError("plt Not Found")
418
+ except Exception as e:
419
+ raise Exception(e)
420
+ def save(self, path, dpi: int = 300, format: str | None = None, bbox_inches: Literal['tight', 'standard', None] = 'tight', pad_inches: float | int = 0, transparent: bool = False, orientation: Literal['landscape', 'portrait']='landscape', metadata=None):
421
+ try:
422
+ if hasattr(self, 'fig'):
423
+ self.fig.savefig(path, dpi=dpi, format=format, bbox_inches=bbox_inches, pad_inches=pad_inches, transparent=transparent, orientation=orientation, metadata=metadata)
424
+ else:
425
+ raise PltNotFoundError("fig not found")
426
+ except Exception as e:
427
+ raise Exception(e)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adopt-plot
3
- Version: 0.0.5
3
+ Version: 0.1.5
4
4
  Summary: A universal plotter for implicit functions using adaptive engine selection.
5
5
  Author: VartRusData
6
6
  License: BSD 3-Clause
File without changes
File without changes
File without changes