Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Jigyasa Watwani
/
growth-pattern-control
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
461ed277
authored
May 09, 2022
by
Jigyasa Watwani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added color bars
parent
803516c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
viz_fixed_boundaries.py
viz_fixed_boundaries.py
View file @
461ed277
...
@@ -6,6 +6,7 @@ import argparse
...
@@ -6,6 +6,7 @@ import argparse
import
progressbar
import
progressbar
import
os
import
os
import
dolfin
as
df
import
dolfin
as
df
from
mpl_toolkits.axes_grid1
import
make_axes_locatable
def
read_data
(
params
,
DIR
):
def
read_data
(
params
,
DIR
):
print
(
'Reading data from
%
s/
%
s...'
%
(
DIR
,
params
[
'timestamp'
]))
print
(
'Reading data from
%
s/
%
s...'
%
(
DIR
,
params
[
'timestamp'
]))
...
@@ -63,13 +64,29 @@ def visualize(params, DIR, interactive=False):
...
@@ -63,13 +64,29 @@ def visualize(params, DIR, interactive=False):
axu
.
set_xlim
(
np
.
min
(
x
),
np
.
max
(
x
))
axu
.
set_xlim
(
np
.
min
(
x
),
np
.
max
(
x
))
axu
.
set_ylim
(
np
.
min
(
times
),
np
.
max
(
times
))
axu
.
set_ylim
(
np
.
min
(
times
),
np
.
max
(
times
))
axu
.
set_ylabel
(
r'$t$'
)
axu
.
set_ylabel
(
r'$t$'
)
umax
,
vmax
,
rhomax
=
np
.
max
(
u
),
np
.
max
(
v
),
np
.
max
(
rho
)
axu
.
contourf
(
x
,
times
,
u
,
cmap
=
'coolwarm'
)
umin
,
vmin
=
-
umax
,
-
vmax
axv
.
contourf
(
x
,
times
,
v
,
cmap
=
'coolwarm'
)
rhomin
=
0
axrho
.
contourf
(
x
,
times
,
rho
,
cmap
=
'viridis'
)
ucplot
=
axu
.
contourf
(
x
,
times
,
u
,
cmap
=
'coolwarm'
,
vmin
=
umin
,
vmax
=
umax
)
vcplot
=
axv
.
contourf
(
x
,
times
,
v
,
cmap
=
'coolwarm'
,
vmin
=
vmin
,
vmax
=
vmax
)
rhocplot
=
axrho
.
contourf
(
x
,
times
,
rho
,
cmap
=
'viridis'
,
vmin
=
rhomin
,
vmax
=
rhomax
)
divideru
=
make_axes_locatable
(
axu
)
ucax
=
divideru
.
append_axes
(
"right"
,
size
=
"5
%
"
,
pad
=
0.05
)
dividerv
=
make_axes_locatable
(
axv
)
vcax
=
dividerv
.
append_axes
(
"right"
,
size
=
"5
%
"
,
pad
=
0.05
)
dividerrho
=
make_axes_locatable
(
axrho
)
rhocax
=
dividerrho
.
append_axes
(
"right"
,
size
=
"5
%
"
,
pad
=
0.05
)
plt
.
colorbar
(
ucplot
,
cax
=
ucax
)
plt
.
colorbar
(
vcplot
,
cax
=
vcax
)
plt
.
colorbar
(
rhocplot
,
cax
=
rhocax
)
if
params
[
'morphogen'
]:
if
params
[
'morphogen'
]:
axc
.
contourf
(
x
,
times
,
c
,
cmap
=
'viridis'
)
cmin
,
cmax
=
0
,
3
*
params
[
'average_c'
]
ccplot
=
axc
.
contourf
(
x
,
times
,
c
,
cmap
=
'viridis'
,
vmin
=
cmin
,
vmax
=
cmax
)
dividerc
=
make_axes_locatable
(
axc
)
ccax
=
dividerc
.
append_axes
(
"right"
,
size
=
"5
%
"
,
pad
=
0.05
)
plt
.
colorbar
(
ccplot
,
cax
=
ccax
)
fig
.
savefig
(
os
.
path
.
join
(
DIR
,
'
%
s.png'
%
params
[
'timestamp'
]),
dpi
=
100
)
fig
.
savefig
(
os
.
path
.
join
(
DIR
,
'
%
s.png'
%
params
[
'timestamp'
]),
dpi
=
100
)
...
@@ -127,3 +144,5 @@ if __name__ == '__main__':
...
@@ -127,3 +144,5 @@ if __name__ == '__main__':
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