prefig 0.4.0.dev20250802054448__tar.gz → 0.4.1__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.
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/PKG-INFO +1 -1
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/point.py +11 -1
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/utilities.py +4 -1
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/schema/pf_schema.rnc +2 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/schema/pf_schema.rng +16 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/pyproject.toml +1 -1
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/LICENSE +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/README.md +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/__init__.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/cli.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/CTM.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/__init__.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/annotations.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/area.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/arrow.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/axes.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/calculus.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/circle.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/clip.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/compat.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/coordinates.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/definition.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/diagram.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/diffeqs.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/graph.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/grid_axes.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/group.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/image.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/implicit.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/label.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/label_tools.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/legend.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/line.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/math_utilities.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/network.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/parametric_curve.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/parse.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/path.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/polygon.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/read.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/rectangle.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/repeat.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/riemann_sum.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/shape.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/slope_field.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/statistics.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/tags.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/tangent_line.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/user_namespace.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/core/vector.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/engine.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/diagcess/diagcess.html +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/diagcess/diagcess.js +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/examples/de-system.xml +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/examples/derivatives.xml +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/examples/diffeqs.xml +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/examples/implicit.xml +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/examples/projection.xml +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/examples/riemann.xml +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/examples/roots_of_unity.xml +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/examples/tangent.xml +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/fonts/Braille29.ttf +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/js/mj-sre-page.js +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/js/package.json +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/template/pf_publication.xml +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/scripts/__init__.py +0 -0
- {prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/scripts/install_mj.py +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import lxml.etree as ET
|
|
2
2
|
import logging
|
|
3
|
+
import numpy as np
|
|
4
|
+
import math
|
|
3
5
|
from . import user_namespace as un
|
|
4
6
|
from . import math_utilities as math_util
|
|
5
7
|
from . import utilities as util
|
|
@@ -18,7 +20,15 @@ def point(element, diagram, parent, outline_status = None):
|
|
|
18
20
|
|
|
19
21
|
# determine the location and size of the point from the XML element
|
|
20
22
|
try:
|
|
21
|
-
p =
|
|
23
|
+
p = un.valid_eval(element.get('p'))
|
|
24
|
+
if element.get('coordinates', 'cartesian') == 'polar':
|
|
25
|
+
radial = p[0]
|
|
26
|
+
angle = p[1]
|
|
27
|
+
if element.get('degrees', 'no') == 'yes':
|
|
28
|
+
angle = math.radians(angle)
|
|
29
|
+
p = radial * np.array([math.cos(angle), math.sin(angle)])
|
|
30
|
+
element.set('p', util.pt2long_str(p, spacer=','))
|
|
31
|
+
p = diagram.transform(p)
|
|
22
32
|
except:
|
|
23
33
|
log.error(f"Error in <point> defining p={element.get('p')}")
|
|
24
34
|
return
|
|
@@ -2,6 +2,9 @@ import numpy as np
|
|
|
2
2
|
from . import user_namespace as un
|
|
3
3
|
from . import label
|
|
4
4
|
|
|
5
|
+
import logging
|
|
6
|
+
logger = logging.getLogger('prefigure')
|
|
7
|
+
|
|
5
8
|
import warnings
|
|
6
9
|
with warnings.catch_warnings():
|
|
7
10
|
warnings.filterwarnings('ignore', 'legacy print')
|
|
@@ -25,7 +28,7 @@ def get_attr(element, attr, default):
|
|
|
25
28
|
try:
|
|
26
29
|
attribute = un.valid_eval(element.get(attr, default))
|
|
27
30
|
if isinstance(attribute, np.ndarray):
|
|
28
|
-
return
|
|
31
|
+
return ','.join([float2longstr(a) for a in attribute])
|
|
29
32
|
return str(attribute)
|
|
30
33
|
except (TypeError, SyntaxError): # this is a string that's not in the namespace
|
|
31
34
|
return element.get(attr, default)
|
|
@@ -685,6 +685,8 @@ Point = element point {
|
|
|
685
685
|
attribute at {text}?,
|
|
686
686
|
attribute style {text}?,
|
|
687
687
|
attribute size {text}?,
|
|
688
|
+
attribute coordinates {"cartesian"|"polar"}?,
|
|
689
|
+
attribute degrees {"yes"|"no"}?,
|
|
688
690
|
LabelAttributes,
|
|
689
691
|
FillAttributes,
|
|
690
692
|
CommonAttributes,
|
|
@@ -1886,6 +1886,22 @@
|
|
|
1886
1886
|
<optional>
|
|
1887
1887
|
<attribute name="size"/>
|
|
1888
1888
|
</optional>
|
|
1889
|
+
<optional>
|
|
1890
|
+
<attribute name="coordinates">
|
|
1891
|
+
<choice>
|
|
1892
|
+
<value>cartesian</value>
|
|
1893
|
+
<value>polar</value>
|
|
1894
|
+
</choice>
|
|
1895
|
+
</attribute>
|
|
1896
|
+
</optional>
|
|
1897
|
+
<optional>
|
|
1898
|
+
<attribute name="degrees">
|
|
1899
|
+
<choice>
|
|
1900
|
+
<value>yes</value>
|
|
1901
|
+
<value>no</value>
|
|
1902
|
+
</choice>
|
|
1903
|
+
</attribute>
|
|
1904
|
+
</optional>
|
|
1889
1905
|
<ref name="LabelAttributes"/>
|
|
1890
1906
|
<ref name="FillAttributes"/>
|
|
1891
1907
|
<ref name="CommonAttributes"/>
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
{prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/examples/roots_of_unity.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prefig-0.4.0.dev20250802054448 → prefig-0.4.1}/prefig/resources/template/pf_publication.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|