Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
bd714c5a
Commit
bd714c5a
authored
Jul 13, 2021
by
Philipp Arras
Browse files
Plotting: Automatic distribution
parent
d49e8817
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plot.py
View file @
bd714c5a
...
...
@@ -26,7 +26,7 @@ from .domains.power_space import PowerSpace
from
.domains.rg_space
import
RGSpace
from
.field
import
Field
from
.minimization.iteration_controllers
import
EnergyHistory
from
.utilities
import
check_domain_equality
from
.utilities
import
check_domain_equality
,
myassert
# relevant properties:
# - x/y size
...
...
@@ -578,7 +578,9 @@ class Plot:
nx
=
kwargs
.
pop
(
"nx"
,
0
)
ny
=
kwargs
.
pop
(
"ny"
,
0
)
if
nx
==
ny
==
0
:
nx
=
ny
=
int
(
np
.
ceil
(
np
.
sqrt
(
nplot
)))
ny
=
int
(
np
.
ceil
(
np
.
sqrt
(
nplot
)))
nx
=
int
(
np
.
ceil
(
nplot
/
ny
))
myassert
(
nx
*
ny
>=
nplot
)
elif
nx
==
0
:
nx
=
int
(
np
.
ceil
(
nplot
/
ny
))
elif
ny
==
0
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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