Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JPSreport
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
JuPedSim
JPSreport
Commits
6fa459ad
Commit
6fa459ad
authored
May 03, 2018
by
Mohcine Chraibi
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polygon plot scripts consider new format
Format is now a string: "id | polygon"
parent
74d8e5b1
Pipeline
#9307
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
21 deletions
+28
-21
scripts/_Plot_cell_rho.py
scripts/_Plot_cell_rho.py
+9
-1
scripts/_Plot_cell_v.py
scripts/_Plot_cell_v.py
+19
-20
No files found.
scripts/_Plot_cell_rho.py
View file @
6fa459ad
...
...
@@ -181,7 +181,10 @@ def main():
# TODO use os.path.join
polys
=
open
(
"%s/polygon%s.dat"
%
(
filepath
,
namefile
)).
readlines
()
for
poly
in
polys
:
exec
(
"p = %s"
%
poly
)
poly
=
poly
.
split
(
"|"
)
poly_index
=
poly
[
0
].
strip
()
Poly
=
poly
[
1
].
strip
()
exec
(
"p = %s"
%
Poly
)
pp
=
locals
()[
'p'
]
polygons
.
append
(
pp
)
xx
=
1.0
/
pol
.
Polygon
(
pp
).
area
()
...
...
@@ -201,6 +204,11 @@ def main():
sm
.
set_clim
(
vmin
=
0
,
vmax
=
5
)
for
j
,
poly
in
enumerate
(
polys
):
ax1
.
add_patch
(
pgon
(
polygons
[
j
],
facecolor
=
sm
.
to_rgba
(
density_orig
[
j
]),
edgecolor
=
'white'
,
linewidth
=
2
))
ax1
.
text
(
polygons
[
j
].
center
()[
0
],
polygons
[
j
].
center
()[
1
],
poly_index
,
horizontalalignment
=
'center'
,
verticalalignment
=
'center'
,
fontsize
=
20
,
color
=
'red'
,
transform
=
ax1
.
transAxes
)
if
(
trajType
==
"xml"
):
fps
,
N
,
Trajdata
=
parse_xml_traj_file
(
trajFile
)
...
...
scripts/_Plot_cell_v.py
View file @
6fa459ad
...
...
@@ -61,7 +61,10 @@ if __name__ == '__main__':
sm
.
set_clim
(
vmin
=
0
,
vmax
=
1.5
)
index
=
0
for
poly
in
polys
:
exec
(
"p = %s"
%
poly
)
poly
=
poly
.
split
(
"|"
)
poly_index
=
poly
[
0
].
strip
()
Poly
=
poly
[
1
].
strip
()
exec
(
"p = %s"
%
Poly
)
xx
=
velocity
[
index
]
index
+=
1
ax1
.
add_patch
(
pgon
(
p
,
facecolor
=
sm
.
to_rgba
(
xx
),
edgecolor
=
'white'
,
linewidth
=
2
))
...
...
@@ -84,7 +87,3 @@ if __name__ == '__main__':
cb
.
set_label
(
'Velocity [$m/s$]'
)
plt
.
savefig
(
"%s/v_%s.png"
%
(
filepath
,
namefile
))
plt
.
close
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment