Skip to content
GitLab
Menu
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
10d351c7
Commit
10d351c7
authored
Jul 24, 2018
by
Philipp Arras
Browse files
Add support for normalized colorbars
parent
e7ff7772
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/plotting/plot.py
View file @
10d351c7
...
...
@@ -203,6 +203,12 @@ def _plot(f, ax, **kwargs):
if
not
isinstance
(
alpha
,
list
):
alpha
=
[
alpha
]
norm
=
kwargs
.
pop
(
"norm"
,
None
)
if
norm
is
None
:
norm
=
{}
else
:
norm
=
{
'norm'
:
norm
}
dom
=
dom
[
0
]
ax
.
set_title
(
kwargs
.
pop
(
"title"
,
""
))
ax
.
set_xlabel
(
kwargs
.
pop
(
"xlabel"
,
""
))
...
...
@@ -232,7 +238,8 @@ def _plot(f, ax, **kwargs):
im
=
ax
.
imshow
(
fld
.
to_global_data
(),
extent
=
[
xc
[
0
],
xc
[
-
1
],
yc
[
0
],
yc
[
-
1
]],
vmin
=
kwargs
.
get
(
"zmin"
),
vmax
=
kwargs
.
get
(
"zmax"
),
cmap
=
cmap
,
origin
=
"lower"
)
vmax
=
kwargs
.
get
(
"zmax"
),
cmap
=
cmap
,
origin
=
"lower"
,
**
norm
)
# from mpl_toolkits.axes_grid1 import make_axes_locatable
# divider = make_axes_locatable(ax)
# cax = divider.append_axes("right", size="5%", pad=0.05)
...
...
Write
Preview
Supports
Markdown
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