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
54a38138
Commit
54a38138
authored
Jul 09, 2021
by
Andrija Kostic
Browse files
A quick fix to make the colorbars nicer and adapt their size to the 2D plots canvas
parent
31318be2
Pipeline
#105327
failed with stages
in 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/plot.py
View file @
54a38138
...
...
@@ -415,11 +415,17 @@ def _plot2D(f, ax, **kwargs):
rgb
,
extent
=
[
0
,
nx
*
dx
,
0
,
ny
*
dy
],
origin
=
"lower"
,
**
norm
,
**
aspect
)
else
:
from
mpl_toolkits.axes_grid1
import
make_axes_locatable
im
=
ax
.
imshow
(
f
.
val
.
T
,
extent
=
[
0
,
nx
*
dx
,
0
,
ny
*
dy
],
vmin
=
kwargs
.
get
(
"vmin"
),
vmax
=
kwargs
.
get
(
"vmax"
),
cmap
=
cmap
,
origin
=
"lower"
,
**
norm
,
**
aspect
)
plt
.
colorbar
(
im
)
divider
=
make_axes_locatable
(
ax
)
cax
=
divider
.
append_axes
(
"right"
,
size
=
"5%"
,
pad
=
0.05
)
plt
.
colorbar
(
im
,
cax
=
cax
)
_limit_xy
(
**
kwargs
)
return
elif
isinstance
(
dom
,
(
HPSpace
,
GLSpace
)):
...
...
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