Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Grégoire Grzeczkowicz
sho
Commits
df17e5c5
Commit
df17e5c5
authored
Oct 19, 2020
by
Grégoire GRZECZKOWICZ
Browse files
Stop ploting option
parent
3e398962
Changes
1
Hide whitespace changes
Inline
Side-by-side
snp.py
View file @
df17e5c5
...
...
@@ -48,6 +48,9 @@ if __name__=="__main__":
can
.
add_argument
(
"-a"
,
"--variation-scale"
,
metavar
=
"RATIO"
,
default
=
0.3
,
type
=
float
,
help
=
"Scale of the variation operators (as a ration of the domain width)"
)
can
.
add_argument
(
"-no"
,
"--no-graphical-output"
,
action
=
'store_true'
,
default
=
False
,
help
=
"Disable graphical output"
)
can
.
add_argument
(
"-o"
,
"--output-file"
,
metavar
=
"NAME"
,
default
=
None
,
type
=
str
,
help
=
"Output file where log are put"
)
...
...
@@ -165,26 +168,28 @@ if __name__=="__main__":
# Fancy output.
print
(
"
\n
{} : {}"
.
format
(
val
,
sensors
))
shape
=
(
the
.
domain_width
,
the
.
domain_width
)
if
the
.
no_graphical_output
is
False
:
shape
=
(
the
.
domain_width
,
the
.
domain_width
)
fig
=
plt
.
figure
()
fig
=
plt
.
figure
()
if
the
.
nb_sensors
==
1
and
the
.
domain_width
<=
50
:
ax1
=
fig
.
add_subplot
(
121
,
projection
=
'3d'
)
ax2
=
fig
.
add_subplot
(
122
)
if
the
.
nb_sensors
==
1
and
the
.
domain_width
<=
50
:
ax1
=
fig
.
add_subplot
(
121
,
projection
=
'3d'
)
ax2
=
fig
.
add_subplot
(
122
)
f
=
make
.
func
(
num
.
cover_sum
,
domain_width
=
the
.
domain_width
,
sensor_range
=
the
.
sensor_range
*
the
.
domain_width
)
plot
.
surface
(
ax1
,
shape
,
f
)
plot
.
path
(
ax1
,
shape
,
history
)
else
:
ax2
=
fig
.
add_subplot
(
111
)
f
=
make
.
func
(
num
.
cover_sum
,
domain_width
=
the
.
domain_width
,
sensor_range
=
the
.
sensor_range
*
the
.
domain_width
)
plot
.
surface
(
ax1
,
shape
,
f
)
plot
.
path
(
ax1
,
shape
,
history
)
else
:
ax2
=
fig
.
add_subplot
(
111
)
domain
=
np
.
zeros
(
shape
)
domain
=
pb
.
coverage
(
domain
,
sensors
,
the
.
sensor_range
*
the
.
domain_width
)
domain
=
plot
.
highlight_sensors
(
domain
,
sensors
)
ax2
.
imshow
(
domain
)
domain
=
np
.
zeros
(
shape
)
domain
=
pb
.
coverage
(
domain
,
sensors
,
the
.
sensor_range
*
the
.
domain_width
)
domain
=
plot
.
highlight_sensors
(
domain
,
sensors
)
ax2
.
imshow
(
domain
)
plt
.
show
()
plt
.
show
()
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