Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vasudevan, Rama K
pycroscopy
Commits
664bf029
Commit
664bf029
authored
Feb 10, 2017
by
Chris Smith
Browse files
New plot function
Adds loop parameters to existing axes from plot_loop_guess_fit
parent
64ed8e53
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycroscopy/viz/plot_utils.py
View file @
664bf029
...
...
@@ -239,8 +239,33 @@ def plot_loop_guess_fit(vdc, ds_proj_loops, ds_guess, ds_fit, title=''):
return
fig
,
axes
###############################################################################
def
_add_loop_parameters
(
axes
,
switching_coef_vec
):
"""
Add the loop parameters for the given loop to a list of axes
Parameters
----------
axes : list of matplotlib.pyplo.axes
Plot axes to add the coeffients to
switching_coef_vec : 1D numpy.ndarray
Array of loop parameters arranged by position
Returns
-------
axes : list of matplotlib.pyplo.axes
"""
positions
=
np
.
linspace
(
0
,
switching_coef_vec
.
shape
[
0
]
-
1
,
len
(
axes
.
flat
),
dtype
=
np
.
int
)
for
ax
,
pos
in
zip
(
axes
.
flat
,
positions
):
ax
.
axvline
(
switching_coef_vec
[
pos
][
'V+'
],
c
=
'k'
,
label
=
'V+'
)
ax
.
axvline
(
switching_coef_vec
[
pos
][
'V-'
],
c
=
'r'
,
label
=
'V-'
)
ax
.
axvline
(
switching_coef_vec
[
pos
][
'Nucleation Bias 1'
],
c
=
'k'
,
ls
=
':'
,
label
=
'Nucleation Bias 1'
)
ax
.
axvline
(
switching_coef_vec
[
pos
][
'Nucleation Bias 2'
],
c
=
'r'
,
ls
=
':'
,
label
=
'Nucleation Bias 2'
)
ax
.
axhline
(
switching_coef_vec
[
pos
][
'R+'
],
c
=
'k'
,
ls
=
'-.'
,
label
=
'R+'
)
ax
.
axhline
(
switching_coef_vec
[
pos
][
'R-'
],
c
=
'r'
,
ls
=
'-.'
,
label
=
'R-'
)
return
axes
def
rainbow_plot
(
ax
,
ao_vec
,
ai_vec
,
num_steps
=
32
,
cmap
=
plt
.
cm
.
jet
,
**
kwargs
):
"""
...
...
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