Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nils Brüggemann
pyicon
Commits
e008b214
Commit
e008b214
authored
May 24, 2022
by
Nils Brüggemann
Browse files
Merge branch 'develop' into master
parents
5c99d5d0
2714fd3d
Pipeline
#18554
passed with stages
in 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pyicon/pyicon_plotting.py
View file @
e008b214
...
...
@@ -475,6 +475,8 @@ def shade(
elif
use_pcol
and
clevs
is
not
None
:
clevs
=
np
.
array
(
clevs
)
use_norm
=
True
elif
norm
is
not
None
:
use_norm
=
False
# prevent that norm is overwritten later on
else
:
norm
=
None
use_norm
=
False
...
...
@@ -498,6 +500,10 @@ def shade(
cmap
.
set_over
(
cmap_e
(
norm_e
(
nlev
)))
vmin
=
None
vmax
=
None
elif
norm
:
vmin
=
None
vmax
=
None
clim
=
[
None
,
None
]
else
:
vmin
=
clim
[
0
]
vmax
=
clim
[
1
]
...
...
@@ -650,7 +656,10 @@ def shade(
# ------ prevent white lines if fig is saved as pdf
cb
.
solids
.
set_edgecolor
(
"face"
)
# ------ use exponential notation for large colorbar ticks
cb
.
formatter
.
set_powerlimits
((
-
3
,
3
))
try
:
cb
.
formatter
.
set_powerlimits
((
-
3
,
3
))
except
:
pass
# ------ colorbar ticks
if
isinstance
(
cbticks
,
np
.
ndarray
)
or
isinstance
(
cbticks
,
list
):
cb
.
set_ticks
(
cbticks
)
...
...
@@ -661,6 +670,8 @@ def shade(
cb
.
set_ticks
(
clevs
[::
2
])
else
:
cb
.
set_ticks
(
clevs
)
elif
use_norm
==
False
and
norm
is
not
None
:
pass
else
:
cb
.
locator
=
ticker
.
MaxNLocator
(
nbins
=
5
)
cb
.
update_ticks
()
...
...
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