pypsbuilder 2.6.2__tar.gz → 2.6.3__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 (112) hide show
  1. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/CHANGELOG.md +4 -0
  2. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/PKG-INFO +6 -1
  3. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/README.md +5 -0
  4. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/__init__.py +1 -1
  5. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/psexplorer.py +102 -85
  6. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/.github/dependabot.yml +0 -0
  7. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/.github/workflows/release.yml +0 -0
  8. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/.github/workflows/testing.yml +0 -0
  9. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/.github/workflows/testrelease.yml +0 -0
  10. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/.gitignore +0 -0
  11. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/.pre-commit-config.yaml +0 -0
  12. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/.readthedocs.yaml +0 -0
  13. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/AUTHORS.md +0 -0
  14. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/CONTRIBUTING.md +0 -0
  15. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/LICENSE +0 -0
  16. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/codecov.yml +0 -0
  17. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/_static/theme_overrides.css +0 -0
  18. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psclasses.Dogmin.rst +0 -0
  19. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psclasses.InvPoint.rst +0 -0
  20. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psclasses.PTsection.rst +0 -0
  21. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psclasses.PXsection.rst +0 -0
  22. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psclasses.TCResult.rst +0 -0
  23. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psclasses.TCResultSet.rst +0 -0
  24. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psclasses.TXsection.rst +0 -0
  25. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psclasses.UniLine.rst +0 -0
  26. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psexplorer.PTPS.rst +0 -0
  27. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psexplorer.PXPS.rst +0 -0
  28. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.psexplorer.TXPS.rst +0 -0
  29. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.tcapi.TC34API.rst +0 -0
  30. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api/pypsbuilder.tcapi.TC35API.rst +0 -0
  31. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/api.rst +0 -0
  32. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/authors.rst +0 -0
  33. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/command-line.rst +0 -0
  34. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/conf.py +0 -0
  35. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/create_environment.png +0 -0
  36. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/crossing.png +0 -0
  37. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/delta.png +0 -0
  38. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/install_locally.png +0 -0
  39. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/invsearch.png +0 -0
  40. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/isopleths_1.png +0 -0
  41. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/isopleths_2.png +0 -0
  42. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/modes.png +0 -0
  43. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psbuilder_areas.png +0 -0
  44. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psbuilder_dogmin.png +0 -0
  45. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psbuilder_finished.png +0 -0
  46. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psbuilder_highlight.png +0 -0
  47. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psbuilder_init.png +0 -0
  48. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psbuilder_inv.png +0 -0
  49. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psbuilder_modes.png +0 -0
  50. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psbuilder_uni.png +0 -0
  51. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psiso_alm.png +0 -0
  52. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psiso_labelkey.png +0 -0
  53. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psiso_mode.png +0 -0
  54. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psiso_other.png +0 -0
  55. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/psshow_out.png +0 -0
  56. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/ptpath.png +0 -0
  57. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/show_data.png +0 -0
  58. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/show_grid.png +0 -0
  59. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/show_label.png +0 -0
  60. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/show_out.png +0 -0
  61. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/show_plain.png +0 -0
  62. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/images/status.png +0 -0
  63. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/index.rst +0 -0
  64. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/psbuilders-tutorial.rst +0 -0
  65. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/psexplorer-tutorial.rst +0 -0
  66. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/docs/readme.rst +0 -0
  67. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/environment.yml +0 -0
  68. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/avgpelite/tc-avgpelite.txt +0 -0
  69. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/avgpelite/tc-ds62.txt +0 -0
  70. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/avgpelite/tc-mp50MnNCKFMASHTO.txt +0 -0
  71. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/avgpelite/tc-prefs.txt +0 -0
  72. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/avgpelite_34/tc-6axmn.txt +0 -0
  73. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/avgpelite_34/tc-avgpelite.txt +0 -0
  74. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/avgpelite_34/tc-ds62.txt +0 -0
  75. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/avgpelite_34/tc-prefs.txt +0 -0
  76. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/inv1-ic.txt +0 -0
  77. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/inv1-log.txt +0 -0
  78. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/inv2-ic.txt +0 -0
  79. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/inv2-log.txt +0 -0
  80. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/inv3-ic.txt +0 -0
  81. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/inv3-log.txt +0 -0
  82. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/uni1-ic.txt +0 -0
  83. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/uni1-log.txt +0 -0
  84. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/uni2-ic.txt +0 -0
  85. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/uni2-log.txt +0 -0
  86. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/uni3-ic.txt +0 -0
  87. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/examples/outputs/uni3-log.txt +0 -0
  88. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/notebooks/pypsbuilder.ipynb +0 -0
  89. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pyproject.toml +0 -0
  90. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/images/ptbuilder.png +0 -0
  91. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/images/pxbuilder.png +0 -0
  92. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/images/pypsbuilder.png +0 -0
  93. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/images/txbuilder.png +0 -0
  94. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/psbuilders.py +0 -0
  95. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/psclasses.py +0 -0
  96. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/tcapi.py +0 -0
  97. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/tcinit.py +0 -0
  98. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/tests/__init__.py +0 -0
  99. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/tests/test_pclasses.py +0 -0
  100. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui/addinv.ui +0 -0
  101. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui/adduni.ui +0 -0
  102. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui/compile_ui.sh +0 -0
  103. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui/ptbuilder.ui +0 -0
  104. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui/pxbuilder.ui +0 -0
  105. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui/txbuilder.ui +0 -0
  106. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui/uniguess.ui +0 -0
  107. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui_addinv.py +0 -0
  108. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui_adduni.py +0 -0
  109. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui_ptbuilder.py +0 -0
  110. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui_pxbuilder.py +0 -0
  111. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui_txbuilder.py +0 -0
  112. {pypsbuilder-2.6.2 → pypsbuilder-2.6.3}/pypsbuilder/ui_uniguess.py +0 -0
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
  All notable pypsbuilder changes.
3
3
 
4
+ ## [2.6.3] - 2025-04-03
5
+ ### Fixed
6
+ - fxed multipolygon bug when subsections are merged
7
+
4
8
  ## [2.6.2] - 2025-02-11
5
9
  ### Fixed
6
10
  - f-string py3.10 bugfix
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypsbuilder
3
- Version: 2.6.2
3
+ Version: 2.6.3
4
4
  Summary: THERMOCALC front-end for constructing and analyzing PT pseudosections
5
5
  Project-URL: Homepage, https://github.com/ondrolexa/pypsbuilder
6
6
  Project-URL: Documentation, https://pypsbuilder.readthedocs.io
@@ -95,6 +95,11 @@ for Windows use Command Prompt or PowerShell:
95
95
  python -m venv .venv
96
96
  .venv\Scripts\activate
97
97
 
98
+ or, if you will got error *'python' is not recognized as an internal or external command*, try:
99
+
100
+ py -m venv .venv
101
+ .venv\Scripts\activate
102
+
98
103
  > [!NOTE]
99
104
  > On Microsoft Windows, it may be required to set the execution policy in PowerShell for the user.
100
105
  > You can do this by issuing the following PowerShell command:
@@ -19,6 +19,11 @@ for Windows use Command Prompt or PowerShell:
19
19
  python -m venv .venv
20
20
  .venv\Scripts\activate
21
21
 
22
+ or, if you will got error *'python' is not recognized as an internal or external command*, try:
23
+
24
+ py -m venv .venv
25
+ .venv\Scripts\activate
26
+
22
27
  > [!NOTE]
23
28
  > On Microsoft Windows, it may be required to set the execution policy in PowerShell for the user.
24
29
  > You can do this by issuing the following PowerShell command:
@@ -22,7 +22,7 @@ __all__ = (
22
22
  "get_tcapi",
23
23
  )
24
24
 
25
- __version__ = "2.6.2"
25
+ __version__ = "2.6.3"
26
26
  __author__ = "Ondrej Lexa"
27
27
  __copyright__ = "© Ondrej Lexa 2016-2025"
28
28
  __email__ = "lexa.ondrej@gmail.com"
@@ -700,13 +700,18 @@ class PS:
700
700
  show = False
701
701
  ax = fig.add_subplot()
702
702
  for k, shape in self.shapes.items():
703
- patch = PolygonPatch(
704
- shape, fc=pscmap(norm(self.variance[k])), ec="none"
705
- )
706
- ax.add_patch(patch)
707
- if show_vertices:
708
- x, y = zip(*patch.get_path().vertices)
709
- ax.plot(x, y, "k.", ms=3)
703
+ if shape.geom_type == "MultiPolygon":
704
+ shapelist = list(shape.geoms)
705
+ else:
706
+ shapelist = [shape]
707
+ for shape in shapelist:
708
+ patch = PolygonPatch(
709
+ shape, fc=pscmap(norm(self.variance[k])), ec="none"
710
+ )
711
+ ax.add_patch(patch)
712
+ if show_vertices:
713
+ x, y = zip(*patch.get_path().vertices)
714
+ ax.plot(x, y, "k.", ms=3)
710
715
  ax.autoscale_view()
711
716
  self.add_overlay(ax, label=label, skiplabels=skiplabels, fontsize=labelfs)
712
717
  if out:
@@ -831,27 +836,42 @@ class PS:
831
836
  def add_overlay(self, ax, fc="none", ec="k", label=False, skiplabels=0, fontsize=6):
832
837
  area = (self.xrange[1] - self.xrange[0]) * (self.yrange[1] - self.yrange[0])
833
838
  for k, shape in self.shapes.items():
834
- ax.add_patch(PolygonPatch(shape, ec=ec, fc=fc, lw=0.5))
835
- if label and (100 * shape.area / area > skiplabels):
836
- # multiline for long labels
837
- tl = sorted(list(k.difference(self.tc.excess)))
838
- extra = self.tc.excess.difference(self.tc.excess.intersection(k))
839
- # if excess in scriptfile is not accurate
840
- if extra:
841
- tl += ["-{}".format(pp) for pp in extra]
842
- wp = len(tl) // 4 + int(len(tl) % 4 > 1)
843
- txt = "\n".join(
844
- [
845
- " ".join([self.abbr.get(sa, sa) for sa in s])
846
- for s in [
847
- tl[i * len(tl) // wp : (i + 1) * len(tl) // wp]
848
- for i in range(wp)
839
+ if shape.geom_type == "MultiPolygon":
840
+ shapelist = list(shape.geoms)
841
+ else:
842
+ shapelist = [shape]
843
+ for shape in shapelist:
844
+ ax.add_patch(PolygonPatch(shape, ec=ec, fc=fc, lw=0.5))
845
+ if label and (100 * shape.area / area > skiplabels):
846
+ # multiline for long labels
847
+ tl = sorted(list(k.difference(self.tc.excess)))
848
+ extra = self.tc.excess.difference(self.tc.excess.intersection(k))
849
+ # if excess in scriptfile is not accurate
850
+ if extra:
851
+ tl += ["-{}".format(pp) for pp in extra]
852
+ wp = len(tl) // 4 + int(len(tl) % 4 > 1)
853
+ txt = "\n".join(
854
+ [
855
+ " ".join([self.abbr.get(sa, sa) for sa in s])
856
+ for s in [
857
+ tl[i * len(tl) // wp : (i + 1) * len(tl) // wp]
858
+ for i in range(wp)
859
+ ]
849
860
  ]
850
- ]
851
- )
852
- if shape.geom_type == "MultiPolygon":
853
- for part in shape:
854
- xy = part.representative_point().coords[0]
861
+ )
862
+ if shape.geom_type == "MultiPolygon":
863
+ for part in shape:
864
+ xy = part.representative_point().coords[0]
865
+ ax.annotate(
866
+ text=txt,
867
+ xy=xy,
868
+ weight="bold",
869
+ fontsize=fontsize,
870
+ ha="center",
871
+ va="center",
872
+ )
873
+ else:
874
+ xy = shape.representative_point().coords[0]
855
875
  ax.annotate(
856
876
  text=txt,
857
877
  xy=xy,
@@ -860,16 +880,6 @@ class PS:
860
880
  ha="center",
861
881
  va="center",
862
882
  )
863
- else:
864
- xy = shape.representative_point().coords[0]
865
- ax.annotate(
866
- text=txt,
867
- xy=xy,
868
- weight="bold",
869
- fontsize=fontsize,
870
- ha="center",
871
- va="center",
872
- )
873
883
 
874
884
  def show_data(self, key, phase, expr=None, which=7):
875
885
  """Convinient function to show values of expression
@@ -1556,57 +1566,62 @@ class PS:
1556
1566
  else:
1557
1567
  cntv = 10
1558
1568
  # ------------
1559
- with warnings.catch_warnings():
1560
- warnings.filterwarnings("ignore", category=UserWarning)
1561
- if filled:
1562
- if colors is not None:
1563
- cont = ax.contourf(
1564
- tg, pg, zg, cntv, colors=colors, alpha=alpha
1565
- )
1566
- if filled_over:
1567
- contover = ax.contour(
1568
- tg, pg, zg, cntv, colors=colors
1569
+ if self.shapes[key].geom_type == "MultiPolygon":
1570
+ shapelist = list(self.shapes[key].geoms)
1571
+ else:
1572
+ shapelist = [self.shapes[key]]
1573
+ for shape in shapelist:
1574
+ with warnings.catch_warnings():
1575
+ warnings.filterwarnings("ignore", category=UserWarning)
1576
+ if filled:
1577
+ if colors is not None:
1578
+ cont = ax.contourf(
1579
+ tg, pg, zg, cntv, colors=colors, alpha=alpha
1569
1580
  )
1570
- else:
1571
- cont = ax.contourf(
1572
- tg, pg, zg, cntv, cmap=cmap, alpha=alpha
1573
- )
1574
- if filled_over:
1575
- contover = ax.contour(
1576
- tg, pg, zg, cntv, colors="whitesmoke"
1581
+ if filled_over:
1582
+ contover = ax.contour(
1583
+ tg, pg, zg, cntv, colors=colors
1584
+ )
1585
+ else:
1586
+ cont = ax.contourf(
1587
+ tg, pg, zg, cntv, cmap=cmap, alpha=alpha
1577
1588
  )
1578
- else:
1579
- if colors is not None:
1580
- cont = ax.contour(tg, pg, zg, cntv, colors=colors)
1589
+ if filled_over:
1590
+ contover = ax.contour(
1591
+ tg, pg, zg, cntv, colors="whitesmoke"
1592
+ )
1581
1593
  else:
1582
- cont = ax.contour(tg, pg, zg, cntv, cmap=cmap)
1583
- patch = PolygonPatch(self.shapes[key], fc="none", ec="none")
1584
- ax.add_patch(patch)
1585
- # label if needed
1586
- if (not filled or filled_over) and key in labelkyes_ok:
1587
- positions = []
1588
- contlbl = contover if filled_over else cont
1589
- for seg in contlbl.get_paths():
1590
- inside = np.fromiter(
1591
- map(
1592
- self.shapes[key].contains,
1593
- MultiPoint(seg.vertices).geoms,
1594
- ),
1595
- dtype=bool,
1594
+ if colors is not None:
1595
+ cont = ax.contour(tg, pg, zg, cntv, colors=colors)
1596
+ else:
1597
+ cont = ax.contour(tg, pg, zg, cntv, cmap=cmap)
1598
+ patch = PolygonPatch(shape, fc="none", ec="none")
1599
+ ax.add_patch(patch)
1600
+ # label if needed
1601
+ if (not filled or filled_over) and key in labelkyes_ok:
1602
+ positions = []
1603
+ contlbl = contover if filled_over else cont
1604
+ for seg in contlbl.get_paths():
1605
+ inside = np.fromiter(
1606
+ map(
1607
+ shape.contains,
1608
+ MultiPoint(seg.vertices).geoms,
1609
+ ),
1610
+ dtype=bool,
1611
+ )
1612
+ if np.any(inside):
1613
+ positions.append(seg.vertices[inside].mean(axis=0))
1614
+ ax.clabel(
1615
+ contlbl,
1616
+ fontsize=9,
1617
+ manual=positions,
1618
+ fmt="%g",
1619
+ inline_spacing=3,
1620
+ inline=not nosplit,
1596
1621
  )
1597
- if np.any(inside):
1598
- positions.append(seg.vertices[inside].mean(axis=0))
1599
- ax.clabel(
1600
- contlbl,
1601
- fontsize=9,
1602
- manual=positions,
1603
- fmt="%g",
1604
- inline_spacing=3,
1605
- inline=not nosplit,
1606
- )
1607
- cont.set_clip_path(patch)
1608
- if filled and filled_over:
1609
- contover.set_clip_path(patch)
1622
+ cont.set_clip_path(patch)
1623
+ if filled and filled_over:
1624
+ contover.set_clip_path(patch)
1610
1625
 
1611
1626
  if only is None:
1612
1627
  self.add_overlay(ax)
@@ -2720,7 +2735,9 @@ class PTPS(PS):
2720
2735
  )
2721
2736
  plt.show()
2722
2737
 
2723
- def pointcalc(self, t=None, p=None, label=False, skiplabels=0, labelfs=6, show_output=False):
2738
+ def pointcalc(
2739
+ self, t=None, p=None, label=False, skiplabels=0, labelfs=6, show_output=False
2740
+ ):
2724
2741
  if t is None or p is None:
2725
2742
  fig, ax = plt.subplots()
2726
2743
  ax.autoscale_view()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes