Skip to content

Commit

Permalink
fixing plot_spectrum
Browse files Browse the repository at this point in the history
  • Loading branch information
JoschD committed Sep 20, 2023
1 parent c929e01 commit be7ffd5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# OMC3 Changelog

#### 2023-09-20 - v0.11.3 - _jdilly_, _awegsche_

- Fixed:
- compatibility with matplotlib 3.8
- skipping important phase advances for HL-LHC (as not defined yet)
- allowing responses with delta_k < 1e-6 for full-response creation

#### 2023-09-01 - v0.11.2 - _jdilly_

- Fixed:
Expand Down
2 changes: 1 addition & 1 deletion omc3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
__title__ = "omc3"
__description__ = "An accelerator physics tools package for the OMC team at CERN."
__url__ = "https://github.com/pylhc/omc3"
__version__ = "0.11.2"
__version__ = "0.11.3"
__author__ = "pylhc"
__author_email__ = "[email protected]"
__license__ = "MIT"
Expand Down
9 changes: 7 additions & 2 deletions omc3/plotting/spectrum/stem.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ def _plot_stems(fig_cont: FigureContainer) -> None:
if data[plane] is None:
continue
# plot
markers, stems, base = ax.stem(data[plane][FREQS], data[plane][AMPS],
use_line_collection=True, basefmt='none', label=label)
try:
# Matplotlib < v3.8
markers, stems, base = ax.stem(data[plane][FREQS], data[plane][AMPS], basefmt='none', label=label,
use_line_collection=True)
except TypeError:
# Matplotlib >= v3.8
markers, stems, base = ax.stem(data[plane][FREQS], data[plane][AMPS], basefmt='none', label=label)

# Set appropriate colors
color = get_cycled_color(idx_data)
Expand Down

0 comments on commit be7ffd5

Please sign in to comment.