Skip to content

Commit 66cf0d5

Browse files
committed
Fix bug in blitting plot and update version
1 parent 1782200 commit 66cf0d5

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-backend = 'setuptools.build_meta'
88

99
[project]
1010
name = "ratapi"
11-
version = "1.0.1.dev0"
11+
version = "1.0.1.dev1"
1212
description = "Python extension for the Reflectivity Analysis Toolbox (RAT)"
1313
readme = "README.md"
1414
requires-python = ">=3.10"

‎ratapi/utils/plotting.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def plot_ref_sld_helper(
142142
A value between 0 and 100 that controls the spacing between the reflectivity plots for each of the contrasts
143143
animated : bool, default: False
144144
Controls whether the animated property of foreground plot elements should be set.
145-
145+
align_profile : bool, default: False
146+
Controls whether the profiles should be aligned.
146147
"""
147148
preserve_zoom = False
148149

@@ -588,10 +589,9 @@ def update_foreground(self, data):
588589

589590
offset = 0
590591
for i in range(len(data.contrastNames)):
591-
for _ in range(int(data.dataPresent[i]) + 1):
592-
self.figure.axes[0].lines[offset].set_data(plot_data["ref"][i][0], plot_data["ref"][i][1])
593-
self.figure.axes[0].draw_artist(self.figure.axes[0].lines[offset])
594-
offset += 1
592+
self.figure.axes[0].lines[offset].set_data(plot_data["ref"][i][0], plot_data["ref"][i][1])
593+
self.figure.axes[0].draw_artist(self.figure.axes[0].lines[offset])
594+
offset += 2 if data.dataPresent[i] else 1
595595

596596
i = 0
597597
for j in range(len(plot_data["sld"])):

0 commit comments

Comments
 (0)