flightplotting 0.2.2__tar.gz → 0.2.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.
- {flightplotting-0.2.2/flightplotting.egg-info → flightplotting-0.2.3}/PKG-INFO +6 -3
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting/plots.py +28 -9
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting/traces.py +3 -11
- {flightplotting-0.2.2 → flightplotting-0.2.3/flightplotting.egg-info}/PKG-INFO +6 -3
- flightplotting-0.2.3/flightplotting.egg-info/requires.txt +7 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/setup.cfg +6 -3
- flightplotting-0.2.2/flightplotting.egg-info/requires.txt +0 -4
- {flightplotting-0.2.2 → flightplotting-0.2.3}/COPYING +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/MANIFEST.in +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/README.md +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting/__init__.py +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting/data/ColdDraftF3APlane.obj +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting/data/__init__.py +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting/model.py +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting/templates.py +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting/titlerenderer.py +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting.egg-info/SOURCES.txt +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting.egg-info/dependency_links.txt +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/flightplotting.egg-info/top_level.txt +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/setup.py +0 -0
- {flightplotting-0.2.2 → flightplotting-0.2.3}/tests/test_plots.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flightplotting
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Tools for Plotting Flight Data in Plotly
|
|
5
5
|
Home-page: https://github.com/PyFlightCoach/FlightPlotting
|
|
6
6
|
Author: Thomas David
|
|
@@ -8,9 +8,12 @@ Author-email: thomasdavid0@gmail.com
|
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: COPYING
|
|
10
10
|
Requires-Dist: setuptools
|
|
11
|
-
Requires-Dist: flightdata
|
|
12
|
-
Requires-Dist: pfc-geometry
|
|
13
11
|
Requires-Dist: plotly
|
|
12
|
+
Requires-Dist: numpy
|
|
13
|
+
Requires-Dist: pandas
|
|
14
|
+
Requires-Dist: pfc-geometry>=0.2.4
|
|
15
|
+
Requires-Dist: flightdata>=0.2.6
|
|
16
|
+
Requires-Dist: flightanalysis>=0.2.6
|
|
14
17
|
|
|
15
18
|
# FlightPlotting
|
|
16
19
|
|
|
@@ -100,22 +100,41 @@ def plotdtw(sec: State, manoeuvres: List[str], span=3, fig=None):
|
|
|
100
100
|
return fig
|
|
101
101
|
|
|
102
102
|
def plot_regions(st: State, lab_cols: list[str], span=3, colours=None, fig=None):
|
|
103
|
-
if
|
|
104
|
-
|
|
103
|
+
colours = px.colors.qualitative.Plotly if colours is None else colours
|
|
104
|
+
lab_cols = [lab_cols] if isinstance(lab_cols, str) else lab_cols
|
|
105
|
+
|
|
106
|
+
st = st.label(clabs=st.cumulative_labels(*lab_cols))
|
|
107
|
+
|
|
108
|
+
def get_base_label(clab):
|
|
109
|
+
base = clab
|
|
110
|
+
try:
|
|
111
|
+
id = int(clab.split('_')[-1])
|
|
112
|
+
base = clab[:-len(f'_{id}')]
|
|
113
|
+
except Exception:
|
|
114
|
+
pass
|
|
115
|
+
return base
|
|
116
|
+
|
|
117
|
+
colmap = {}
|
|
118
|
+
|
|
105
119
|
traces = []
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
120
|
+
for i, (k, seg) in enumerate(st.split_labels('clabs').items()):
|
|
121
|
+
blab = get_base_label(k)
|
|
122
|
+
if blab not in colmap:
|
|
123
|
+
colmap[blab] = colours[len(colmap) % len(colours)]
|
|
124
|
+
leg = True
|
|
125
|
+
else:
|
|
126
|
+
leg = False
|
|
127
|
+
|
|
128
|
+
traces += ribbon(seg, span, colmap[blab], name=k, showlegend=leg)
|
|
111
129
|
|
|
112
130
|
traces.append(go.Scatter3d(
|
|
113
131
|
x=seg.pos.x,
|
|
114
132
|
y=seg.pos.y,
|
|
115
133
|
z=seg.pos.z,
|
|
116
134
|
mode='lines',
|
|
117
|
-
line=dict(width=6, color=
|
|
118
|
-
name=k
|
|
135
|
+
line=dict(width=6, color=colmap[blab]),
|
|
136
|
+
name=k,
|
|
137
|
+
showlegend=False
|
|
119
138
|
))
|
|
120
139
|
|
|
121
140
|
if fig is None:
|
|
@@ -236,16 +236,8 @@ def _npinterzip(a, b):
|
|
|
236
236
|
return c
|
|
237
237
|
|
|
238
238
|
|
|
239
|
-
def ribbon(sec: State, span: float, color
|
|
240
|
-
"""
|
|
241
|
-
|
|
242
|
-
refactoring ribbon, objectives:
|
|
243
|
-
speed it up by avoiding looping over array - done
|
|
244
|
-
make the colouring more generic - not yet
|
|
245
|
-
minor mod - 2 triangles per pair of points: - done
|
|
246
|
-
current pair to next left
|
|
247
|
-
current right to next pair
|
|
248
|
-
|
|
239
|
+
def ribbon(sec: State, span: float, color, **kwargs):
|
|
240
|
+
"""TODO make the colouring more generic
|
|
249
241
|
"""
|
|
250
242
|
|
|
251
243
|
left = sec.body_to_world(Point(0, span/2, 0))
|
|
@@ -267,5 +259,5 @@ def ribbon(sec: State, span: float, color: str, name="none"):
|
|
|
267
259
|
x=points.x, y=points.y, z=points.z, i=_i, j=_j, k=_k,
|
|
268
260
|
intensitymode="cell",
|
|
269
261
|
facecolor=np.full(len(_i), color),
|
|
270
|
-
|
|
262
|
+
**kwargs
|
|
271
263
|
)]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flightplotting
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Tools for Plotting Flight Data in Plotly
|
|
5
5
|
Home-page: https://github.com/PyFlightCoach/FlightPlotting
|
|
6
6
|
Author: Thomas David
|
|
@@ -8,9 +8,12 @@ Author-email: thomasdavid0@gmail.com
|
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: COPYING
|
|
10
10
|
Requires-Dist: setuptools
|
|
11
|
-
Requires-Dist: flightdata
|
|
12
|
-
Requires-Dist: pfc-geometry
|
|
13
11
|
Requires-Dist: plotly
|
|
12
|
+
Requires-Dist: numpy
|
|
13
|
+
Requires-Dist: pandas
|
|
14
|
+
Requires-Dist: pfc-geometry>=0.2.4
|
|
15
|
+
Requires-Dist: flightdata>=0.2.6
|
|
16
|
+
Requires-Dist: flightanalysis>=0.2.6
|
|
14
17
|
|
|
15
18
|
# FlightPlotting
|
|
16
19
|
|
|
@@ -5,15 +5,18 @@ author_email = thomasdavid0@gmail.com
|
|
|
5
5
|
description = Tools for Plotting Flight Data in Plotly
|
|
6
6
|
long_description = file: README.md
|
|
7
7
|
long_description_content_type = text/markdown
|
|
8
|
-
version = 0.2.
|
|
8
|
+
version = 0.2.3
|
|
9
9
|
url = https://github.com/PyFlightCoach/FlightPlotting
|
|
10
10
|
|
|
11
11
|
[options]
|
|
12
12
|
install_requires =
|
|
13
13
|
setuptools
|
|
14
|
-
flightdata
|
|
15
|
-
pfc-geometry
|
|
16
14
|
plotly
|
|
15
|
+
numpy
|
|
16
|
+
pandas
|
|
17
|
+
pfc-geometry>=0.2.4
|
|
18
|
+
flightdata>=0.2.6
|
|
19
|
+
flightanalysis>=0.2.6
|
|
17
20
|
include_package_data = True
|
|
18
21
|
|
|
19
22
|
[egg_info]
|
|
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
|