Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BEA data analysis utils
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Philipp Niedermayer
BEA data analysis utils
Commits
476923ea
Commit
476923ea
authored
10 months ago
by
Philipp Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
Rasterize smoothed plot
parent
8ab03059
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plotting/other.py
+4
-3
4 additions, 3 deletions
plotting/other.py
with
4 additions
and
3 deletions
plotting/other.py
+
4
−
3
View file @
476923ea
...
...
@@ -239,7 +239,8 @@ def smooth_plot(ax, x, y, smoothing=None, swap_xy=False, **kwargs):
r
=
ax
.
plot
(
*
v
(
swap_xy
,
x
,
*
smooth
(
y
,
n
=
smoothing
)),
**
kwargs
)
if
smoothing
:
add_scale
(
ax
,
np
.
mean
(
np
.
diff
(
x
))
*
smoothing
,
vertical
=
swap_xy
)
kwargs
.
update
(
lw
=
1
,
alpha
=
0.1
,
label
=
None
,
zorder
=-
1
,
color
=
r
[
0
].
get_color
())
kwargs
=
dict
(
dict
(
lw
=
1
,
color
=
r
[
0
].
get_color
(),
rasterized
=
True
),
**
kwargs
)
kwargs
.
update
(
label
=
None
,
alpha
=
0.1
,
zorder
=-
1
)
ax
.
plot
(
*
v
(
swap_xy
,
x
,
y
),
**
kwargs
)
return
r
...
...
@@ -487,8 +488,8 @@ def plot_tune_spectrum(ax, libera_data, xy, turn_range=None, time_range=None, tu
ax
.
plot
(
*
v
(
swap_xy
,
*
fitr
[
-
1
]),
'
--
'
,
lw
=
1
,
label
=
'
\n
'
.
join
(
labels
),
zorder
=
50
)
q
=
qs
except
RuntimeError
:
print
(
'
Warning: fit failed
'
)
except
RuntimeError
as
e
:
print
(
'
Warning: fit failed
:
'
,
e
)
if
return_spectrum
:
return
freq
,
mag
,
phase
,
q
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment