kaxe 1.4.4.dev8__tar.gz → 1.4.4.dev10__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.
- {kaxe-1.4.4.dev8/src/kaxe.egg-info → kaxe-1.4.4.dev10}/PKG-INFO +1 -1
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/pyproject.toml +1 -1
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/point.py +23 -15
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/point.py +1 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/grid.py +50 -19
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10/src/kaxe.egg-info}/PKG-INFO +1 -1
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/LICENSE +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/MANIFEST.in +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/README.md +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/setup.cfg +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/chart/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/chart/bar.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/chart/box.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/chart/pie.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/chart/qqplot.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/axis.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/color.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/backend.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/camera.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/helper.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/hud.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/objects/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/objects/color.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/objects/line.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/objects/point.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/objects/pointer.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/objects/triangle.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/openglrender.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/d3/translator.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/draw.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/fileloader.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/helper.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/legend.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/line.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/marker.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/profiler.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/round.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/shapes.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/styles.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/svg.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/svg_pdf.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/symbol.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/text.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/core/window.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/data/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/data/excel.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/_lazy.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/arrow.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/bubble.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/contour.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/equation.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/fill.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/function.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/map.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/parameter.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d2/pillar.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d3/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d3/base.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d3/function.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d3/mesh.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d3/point.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/d3/potato.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/function.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/legend.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/mapdata.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/objects/text.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/_lazy.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/box.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/constants.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/d3/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/d3/axes.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/d3/geometry.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/d3/plot3d.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/d3/variants.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/double.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/empty.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/log.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/polar.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/standard.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/themes.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/zoom.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/plot/zoom_connector.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/__init__.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.bright-oblique.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.bright-roman.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.bright-semibold.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.bright-semiboldoblique.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.classical-serif-italic.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.concrete-bold.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.concrete-bolditalic.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.concrete-italic.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.concrete-roman.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.sans-serif-bold.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.sans-serif-boldoblique.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.sans-serif-demi-condensed-demicondensed.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.sans-serif-medium.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.sans-serif-oblique.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-bold.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-bolditalic.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-extra-boldslanted.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-extra-romanslanted.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-italic.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-roman.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-upright-italic-uprightitalic.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.typewriter-text-bold.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.typewriter-text-bolditalic.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.typewriter-text-italic.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.typewriter-text-light.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.typewriter-text-lightoblique.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.typewriter-text-regular.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.typewriter-text-variable-width-italic.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.typewriter-text-variable-width-medium.ttf +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/readme.txt +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/logo-small.png +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/symbolcross.png +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/symboldonut.png +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/symbollollipop.png +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/symboltriangle.png +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe.egg-info/SOURCES.txt +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe.egg-info/dependency_links.txt +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe.egg-info/requires.txt +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe.egg-info/top_level.txt +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/tests/test.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/tests/test2.py +0 -0
- {kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/tests/test3.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kaxe
|
|
3
|
-
Version: 1.4.4.
|
|
3
|
+
Version: 1.4.4.dev10
|
|
4
4
|
Summary: A small graphing tool for functions, points, equations and more
|
|
5
5
|
Author-email: Valter Yde Daugberg <valteryde@hotmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/valteryde/kaxe
|
|
@@ -27,9 +27,12 @@ class Points2D:
|
|
|
27
27
|
If True, the points will be connected by lines. Default is False.
|
|
28
28
|
lollipop : bool, optional
|
|
29
29
|
If True, the points will be represented as lollipops. Default is False.
|
|
30
|
+
show_points : bool, optional
|
|
31
|
+
If False, point markers are not drawn. With ``connect=True``, junction
|
|
32
|
+
circles matching the line width are still drawn. Default is True.
|
|
30
33
|
"""
|
|
31
34
|
|
|
32
|
-
def __init__(self, x, y, color:tuple=None, size:int=None, symbol:str=None, connect:bool=False, lollipop=False):
|
|
35
|
+
def __init__(self, x, y, color:tuple=None, size:int=None, symbol:str=None, connect:bool=False, lollipop=False, show_points:bool=True):
|
|
33
36
|
self.batch = shapes.Batch()
|
|
34
37
|
self.points = []
|
|
35
38
|
self.lines = []
|
|
@@ -64,6 +67,9 @@ class Points2D:
|
|
|
64
67
|
|
|
65
68
|
self.legendColor = self.color
|
|
66
69
|
self.connect = connect
|
|
70
|
+
self.show_points = show_points
|
|
71
|
+
if not show_points and connect and not symbol:
|
|
72
|
+
self.legendSymbol = symbols.LINE
|
|
67
73
|
|
|
68
74
|
if len(self.x) > 0:
|
|
69
75
|
self.farLeft = min(self.x)
|
|
@@ -80,6 +86,7 @@ class Points2D:
|
|
|
80
86
|
if self.size is None: self.size = round(parent.getAttr('fontSize') / 3)
|
|
81
87
|
scale = parent.getVisualScale()
|
|
82
88
|
size = max(1, round(self.size * scale))
|
|
89
|
+
line_width = max(1, int(size * 0.5))
|
|
83
90
|
|
|
84
91
|
for i, (x,y) in enumerate(zip(self.x,self.y)):
|
|
85
92
|
x,y = parent.pixel(x, y)
|
|
@@ -88,22 +95,22 @@ class Points2D:
|
|
|
88
95
|
continue
|
|
89
96
|
|
|
90
97
|
# symbol
|
|
91
|
-
if self.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
shapes.Circle(x, y,
|
|
98
|
+
if self.show_points:
|
|
99
|
+
if self.symbol:
|
|
100
|
+
symbol = makeSymbolShapes(self.symbol, size, self.color, batch=self.batch)
|
|
101
|
+
symbol.x = x
|
|
102
|
+
symbol.y = y
|
|
103
|
+
if hasattr(symbol, 'centerAlign'): symbol.centerAlign()
|
|
104
|
+
self.points.append(symbol)
|
|
105
|
+
else:
|
|
106
|
+
shapes.Circle(x, y, self.size/2, self.color, batch=self.batch)
|
|
107
|
+
elif self.connect:
|
|
108
|
+
shapes.Circle(x, y, line_width / 2, self.color, batch=self.batch)
|
|
102
109
|
|
|
103
110
|
# lollipop (lagt til lines)
|
|
104
111
|
if self.lollipop:
|
|
105
112
|
_, y0 = parent.pixel(x, min(max(0, parent.windowAxis[2]), parent.windowAxis[3]))
|
|
106
|
-
line = shapes.Line(x, y, x, y0, color=self.color, width=
|
|
113
|
+
line = shapes.Line(x, y, x, y0, color=self.color, width=line_width, batch=self.batch, center=True)
|
|
107
114
|
self.lines.append(line)
|
|
108
115
|
|
|
109
116
|
# connect
|
|
@@ -114,13 +121,14 @@ class Points2D:
|
|
|
114
121
|
if x1 is None or y1 is None or x is None or y is None:
|
|
115
122
|
continue
|
|
116
123
|
|
|
117
|
-
if
|
|
124
|
+
skip_dist = size if self.symbol else (line_width if not self.show_points else None)
|
|
125
|
+
if skip_dist and vlen(vdiff((x1, y1), (x,y))) < skip_dist:
|
|
118
126
|
continue
|
|
119
127
|
|
|
120
128
|
if not parent.inside(x1, y1):
|
|
121
129
|
continue
|
|
122
130
|
|
|
123
|
-
line = shapes.Line(x,y, x1, y1, color=self.color, width=
|
|
131
|
+
line = shapes.Line(x,y, x1, y1, color=self.color, width=line_width, batch=self.batch, center=True)
|
|
124
132
|
self.lines.append(line)
|
|
125
133
|
|
|
126
134
|
|
|
@@ -22,6 +22,7 @@ class Points:
|
|
|
22
22
|
Y coordinates of the points.
|
|
23
23
|
**kwargs
|
|
24
24
|
Additional keyword arguments. For the appropiate keyworks see arguments for Points2D and Points3D.
|
|
25
|
+
``show_points`` is supported by Points2D only (line-only plots with ``connect=True``).
|
|
25
26
|
|
|
26
27
|
Returns
|
|
27
28
|
-------
|
|
@@ -101,7 +101,19 @@ class Grid(AttrObject):
|
|
|
101
101
|
self.style(**theme)
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
def _reset_cell_bake_state(self, plot):
|
|
105
|
+
if plot == XYZPLOT or isinstance(plot, str):
|
|
106
|
+
return
|
|
107
|
+
plot.padding = [0, 0, 0, 0]
|
|
108
|
+
plot.resetAllPushed()
|
|
109
|
+
plot.shapes = []
|
|
110
|
+
plot.__included__ = []
|
|
111
|
+
plot.__baked__ = False
|
|
112
|
+
plot.__bakedImage__ = False
|
|
113
|
+
|
|
114
|
+
|
|
104
115
|
def _apply_cell_styles(self, plot, cellWidth, cellHeight):
|
|
116
|
+
self._reset_cell_bake_state(plot)
|
|
105
117
|
plot.style(
|
|
106
118
|
width=cellWidth,
|
|
107
119
|
height=cellHeight,
|
|
@@ -120,17 +132,13 @@ class Grid(AttrObject):
|
|
|
120
132
|
|
|
121
133
|
cellWidth, cellHeight = self.width // gridSize[0], self.height // gridSize[1]
|
|
122
134
|
|
|
123
|
-
height = 0
|
|
124
135
|
leftpadding = 0
|
|
125
136
|
rightpadding = 0
|
|
126
137
|
toppadding = 0
|
|
127
138
|
bottompadding = 0
|
|
128
139
|
gapcol = 0
|
|
129
|
-
maxWidth = 0
|
|
130
140
|
|
|
131
141
|
for row in grid:
|
|
132
|
-
maxHeight = 0
|
|
133
|
-
|
|
134
142
|
for colNum, plot in enumerate(row):
|
|
135
143
|
self._apply_cell_styles(plot, cellWidth, cellHeight)
|
|
136
144
|
|
|
@@ -149,10 +157,6 @@ class Grid(AttrObject):
|
|
|
149
157
|
plot.__ioBytes = memfile
|
|
150
158
|
memfile.seek(0)
|
|
151
159
|
|
|
152
|
-
w, h = plot.getSize()
|
|
153
|
-
maxWidth = max(w, maxWidth)
|
|
154
|
-
maxHeight = max(h, maxHeight)
|
|
155
|
-
|
|
156
160
|
if colNum == 0:
|
|
157
161
|
leftpadding = max(leftpadding, plot.padding[0])
|
|
158
162
|
bottompadding = max(bottompadding, plot.padding[1])
|
|
@@ -163,8 +167,24 @@ class Grid(AttrObject):
|
|
|
163
167
|
rightpadding = max(rightpadding, plot.padding[2])
|
|
164
168
|
toppadding = max(toppadding, plot.padding[3])
|
|
165
169
|
|
|
166
|
-
|
|
167
|
-
|
|
170
|
+
gapcol = max(gapcol, self.gridGap[0])
|
|
171
|
+
|
|
172
|
+
gaprows = []
|
|
173
|
+
for row_idx in range(len(grid) - 1):
|
|
174
|
+
boundary_gap = 0
|
|
175
|
+
row_above = grid[row_idx]
|
|
176
|
+
row_below = grid[row_idx + 1]
|
|
177
|
+
for col_idx in range(max(len(row_above), len(row_below))):
|
|
178
|
+
if col_idx < len(row_above) and col_idx < len(row_below):
|
|
179
|
+
above = row_above[col_idx]
|
|
180
|
+
below = row_below[col_idx]
|
|
181
|
+
boundary_gap = max(
|
|
182
|
+
boundary_gap,
|
|
183
|
+
above.padding[1] + below.padding[3],
|
|
184
|
+
)
|
|
185
|
+
gaprows.append(max(boundary_gap, self.gridGap[1]))
|
|
186
|
+
|
|
187
|
+
num_rows = len(grid)
|
|
168
188
|
largetsRowNumber = max(len(i) for i in grid)
|
|
169
189
|
width = (
|
|
170
190
|
gapcol * (largetsRowNumber - 1)
|
|
@@ -172,10 +192,16 @@ class Grid(AttrObject):
|
|
|
172
192
|
+ leftpadding
|
|
173
193
|
+ rightpadding
|
|
174
194
|
)
|
|
195
|
+
height = (
|
|
196
|
+
num_rows * cellHeight
|
|
197
|
+
+ sum(gaprows)
|
|
198
|
+
+ toppadding
|
|
199
|
+
+ bottompadding
|
|
200
|
+
)
|
|
175
201
|
|
|
176
202
|
size = (
|
|
177
203
|
width + self.outerPadding[0] + self.outerPadding[2],
|
|
178
|
-
height + self.outerPadding[1] + self.outerPadding[3]
|
|
204
|
+
height + self.outerPadding[1] + self.outerPadding[3],
|
|
179
205
|
)
|
|
180
206
|
|
|
181
207
|
legend_image = None
|
|
@@ -201,10 +227,13 @@ class Grid(AttrObject):
|
|
|
201
227
|
return {
|
|
202
228
|
"grid": grid,
|
|
203
229
|
"cellWidth": cellWidth,
|
|
230
|
+
"cellHeight": cellHeight,
|
|
204
231
|
"gapcol": gapcol,
|
|
232
|
+
"gaprows": gaprows,
|
|
205
233
|
"size": size,
|
|
206
234
|
"leftpadding": leftpadding,
|
|
207
235
|
"toppadding": toppadding,
|
|
236
|
+
"bottompadding": bottompadding,
|
|
208
237
|
"legend_image": legend_image,
|
|
209
238
|
"legend_doc": legend_doc,
|
|
210
239
|
"legend_top_margin": legend_top_margin,
|
|
@@ -215,7 +244,9 @@ class Grid(AttrObject):
|
|
|
215
244
|
grid = layout["grid"]
|
|
216
245
|
size = layout["size"]
|
|
217
246
|
cellWidth = layout["cellWidth"]
|
|
247
|
+
cellHeight = layout["cellHeight"]
|
|
218
248
|
gapcol = layout["gapcol"]
|
|
249
|
+
gaprows = layout["gaprows"]
|
|
219
250
|
leftpadding = layout["leftpadding"]
|
|
220
251
|
toppadding = layout["toppadding"]
|
|
221
252
|
|
|
@@ -233,8 +264,7 @@ class Grid(AttrObject):
|
|
|
233
264
|
|
|
234
265
|
y = toppadding + self.outerPadding[1]
|
|
235
266
|
|
|
236
|
-
for row in grid:
|
|
237
|
-
maxHeight = 0
|
|
267
|
+
for row_idx, row in enumerate(grid):
|
|
238
268
|
x = leftpadding + self.outerPadding[0]
|
|
239
269
|
|
|
240
270
|
for plot in row:
|
|
@@ -242,9 +272,9 @@ class Grid(AttrObject):
|
|
|
242
272
|
plot.__ioBytes.seek(0)
|
|
243
273
|
image.paste(img, (x - plot.padding[0], y - plot.padding[3]))
|
|
244
274
|
x += cellWidth + gapcol
|
|
245
|
-
maxHeight = max(maxHeight, plot.getSize()[1])
|
|
246
275
|
|
|
247
|
-
|
|
276
|
+
if row_idx < len(grid) - 1:
|
|
277
|
+
y += cellHeight + gaprows[row_idx]
|
|
248
278
|
|
|
249
279
|
return image
|
|
250
280
|
|
|
@@ -253,7 +283,9 @@ class Grid(AttrObject):
|
|
|
253
283
|
size = layout["size"]
|
|
254
284
|
grid = layout["grid"]
|
|
255
285
|
cellWidth = layout["cellWidth"]
|
|
286
|
+
cellHeight = layout["cellHeight"]
|
|
256
287
|
gapcol = layout["gapcol"]
|
|
288
|
+
gaprows = layout["gaprows"]
|
|
257
289
|
leftpadding = layout["leftpadding"]
|
|
258
290
|
toppadding = layout["toppadding"]
|
|
259
291
|
|
|
@@ -271,8 +303,7 @@ class Grid(AttrObject):
|
|
|
271
303
|
|
|
272
304
|
y = toppadding + self.outerPadding[1]
|
|
273
305
|
|
|
274
|
-
for row in grid:
|
|
275
|
-
maxHeight = 0
|
|
306
|
+
for row_idx, row in enumerate(grid):
|
|
276
307
|
x = leftpadding + self.outerPadding[0]
|
|
277
308
|
|
|
278
309
|
for plot in row:
|
|
@@ -292,9 +323,9 @@ class Grid(AttrObject):
|
|
|
292
323
|
doc.add_image(img, px, py, y_coord="top")
|
|
293
324
|
|
|
294
325
|
x += cellWidth + gapcol
|
|
295
|
-
maxHeight = max(maxHeight, plot.getSize()[1])
|
|
296
326
|
|
|
297
|
-
|
|
327
|
+
if row_idx < len(grid) - 1:
|
|
328
|
+
y += cellHeight + gaprows[row_idx]
|
|
298
329
|
|
|
299
330
|
return doc
|
|
300
331
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kaxe
|
|
3
|
-
Version: 1.4.4.
|
|
3
|
+
Version: 1.4.4.dev10
|
|
4
4
|
Summary: A small graphing tool for functions, points, equations and more
|
|
5
5
|
Author-email: Valter Yde Daugberg <valteryde@hotmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/valteryde/kaxe
|
|
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
|
|
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
|
{kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.bright-roman.ttf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.concrete-bold.ttf
RENAMED
|
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
|
{kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-bold.ttf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-italic.ttf
RENAMED
|
File without changes
|
{kaxe-1.4.4.dev8 → kaxe-1.4.4.dev10}/src/kaxe/resources/computer-modern-family/cmu.serif-roman.ttf
RENAMED
|
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
|