Skip to content

Commit 1c2f6bb

Browse files
committed
Fix RST indentation bug in interactive_plots.rst for PR #480
The CI failure in PR #480 was caused by broken indentation in interactive_plots.rst. The hd.dynspread(...) block was at column 0 instead of being indented with 4 spaces, placing it outside the RST code-block directive. When notebooks are generated from this RST file, the unindented code becomes markdown text instead of Python code, causing notebook execution to fail. This commit applies the PR #480 changes (PeptideIdentificationList, get2DPeakDataLong 5th arg, refactored opts) with correct indentation.
1 parent 5b78484 commit 1c2f6bb

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

docs/source/user_guide/interactive_plots.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ interactively zoomed-in if you execute the code in a notebook
3535
exp.updateRanges()
3636
expandcols = ["RT", "mz", "inty"]
3737
spectraarrs2d = exp.get2DPeakDataLong(
38-
exp.getMinRT(), exp.getMaxRT(), exp.getMinMZ(), exp.getMaxMZ()
38+
exp.getMinRT(), exp.getMaxRT(), exp.getMinMZ(), exp.getMaxMZ(), 1
3939
)
4040
spectradf = pd.DataFrame(dict(zip(expandcols, spectraarrs2d)))
4141
spectradf = spectradf.set_index(["RT", "mz"])
@@ -75,17 +75,14 @@ interactively zoomed-in if you execute the code in a notebook
7575
min_alpha=0,
7676
)
7777
.opts(active_tools=["box_zoom"], tools=["hover"], hooks=[new_bounds_hook])
78-
.opts( # weird.. I have no idea why one has to do this. But with one opts you will get an error
79-
plot=dict(
80-
width=800,
81-
height=800,
82-
xlabel="Retention time (s)",
83-
ylabel="mass/charge (Da)",
84-
)
85-
)
8678
)
8779
88-
hd.dynspread(raster, threshold=0.7, how="add", shape="square")
80+
hd.dynspread(raster, threshold=0.7, how="add", shape="square").opts(
81+
width=800,
82+
height=800,
83+
xlabel="Retention time (s)",
84+
ylabel="mass/charge (Da)",
85+
)
8986
9087
9188
Result:

0 commit comments

Comments
 (0)