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
89330a8d
Commit
89330a8d
authored
May 07, 2017
by
Theo Steininger
Browse files
PEP8 cosmetics.
parent
65aa95cf
Pipeline
#12108
failed with stage
in 4 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/plotting/figures/multi_figure.py
View file @
89330a8d
...
...
@@ -31,17 +31,20 @@ class MultiFigure(FigureBase):
def
to_plotly
(
self
):
title_extractor
=
lambda
z
:
z
.
title
if
z
else
""
sub_titles
=
tuple
(
np
.
vectorize
(
title_extractor
)(
self
.
subfigures
.
flatten
()))
sub_titles
=
\
tuple
(
np
.
vectorize
(
title_extractor
)(
self
.
subfigures
.
flatten
()))
specs_setter
=
lambda
z
:
{
'is_3d'
:
True
}
if
isinstance
(
z
,
Figure3D
)
else
{}
sub_specs
=
list
(
map
(
list
,
np
.
vectorize
(
specs_setter
)(
self
.
subfigures
)))
specs_setter
=
\
lambda
z
:
{
'is_3d'
:
True
}
if
isinstance
(
z
,
Figure3D
)
else
{}
sub_specs
=
\
list
(
map
(
list
,
np
.
vectorize
(
specs_setter
)(
self
.
subfigures
)))
multi_figure_plotly_object
=
plotly
.
tools
.
make_subplots
(
self
.
rows
,
self
.
columns
,
subplot_titles
=
sub_titles
,
specs
=
sub_specs
)
#TODO resolve bug with titles and 3D subplots
#
TODO resolve bug with titles and 3D subplots
for
index
,
fig
in
np
.
ndenumerate
(
self
.
subfigures
):
if
fig
:
for
plot
in
fig
.
plots
:
...
...
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