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
Sebastian Steinlechner
pykat
Commits
d3cb761a
Commit
d3cb761a
authored
Jun 24, 2016
by
Daniel Toyra
Browse files
Changed from pylab to pyplot for plotting absorption map
parent
92812439
Changes
1
Show whitespace changes
Inline
Side-by-side
pykat/optics/maps.py
View file @
d3cb761a
...
...
@@ -1604,7 +1604,8 @@ class mergedmap:
def
plot
(
self
,
mode
=
"absorption"
,
show
=
True
,
clabel
=
None
,
xlim
=
None
,
ylim
=
None
,
wavelength
=
1064e-9
,
isBlock
=
False
):
import
pylab
import
matplotlib
import
matplotlib.pyplot
as
plt
if
xlim
is
not
None
:
_x
=
np
.
logical_and
(
self
.
x
<=
max
(
xlim
)
/
100.0
,
self
.
x
>=
min
(
xlim
)
/
100.0
)
...
...
@@ -1639,15 +1640,15 @@ class mergedmap:
xrange
=
100
*
self
.
x
yrange
=
100
*
self
.
y
fig
=
p
ylab
.
figure
()
axes
=
p
ylab
.
pcolormesh
(
xrange
,
yrange
,
data
,
vmin
=
zmin
,
vmax
=
zmax
)
p
ylab
.
xlabel
(
'x [cm]'
)
p
ylab
.
ylabel
(
'y [cm]'
)
fig
=
p
lt
.
figure
()
axes
=
p
lt
.
pcolormesh
(
xrange
,
yrange
,
data
,
vmin
=
zmin
,
vmax
=
zmax
)
p
lt
.
xlabel
(
'x [cm]'
)
p
lt
.
ylabel
(
'y [cm]'
)
if
xlim
is
not
None
:
p
ylab
.
xlim
(
xlim
)
if
ylim
is
not
None
:
p
ylab
.
ylim
(
ylim
)
if
xlim
is
not
None
:
p
lt
.
xlim
(
xlim
)
if
ylim
is
not
None
:
p
lt
.
ylim
(
ylim
)
p
ylab
.
title
(
'Merged map {0}, mode {1}'
.
format
(
self
.
name
,
mode
))
p
lt
.
title
(
'Merged map {0}, mode {1}'
.
format
(
self
.
name
,
mode
))
cbar
=
fig
.
colorbar
(
axes
)
cbar
.
set_clim
(
zmin
,
zmax
)
...
...
@@ -1656,7 +1657,7 @@ class mergedmap:
cbar
.
set_label
(
clabel
)
if
show
:
p
ylab
.
show
(
block
=
isBlock
)
p
lt
.
show
(
block
=
isBlock
)
return
fig
...
...
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