From 9d5a6b3048230a89a5bba1b004189f44ba62e50c Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Mon, 21 Oct 2024 20:45:00 +0200 Subject: [PATCH] SweepFormula: Always use linestyle for sweep data Experience has shown that users never want to have markers for sweep data. --- Packages/MIES/MIES_SweepFormula_Helpers.ipf | 2 ++ .../Basic/UTF_SweepFormula_Operations.ipf | 20 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Packages/MIES/MIES_SweepFormula_Helpers.ipf b/Packages/MIES/MIES_SweepFormula_Helpers.ipf index 1d7ce7efb6..ae1ea961cc 100644 --- a/Packages/MIES/MIES_SweepFormula_Helpers.ipf +++ b/Packages/MIES/MIES_SweepFormula_Helpers.ipf @@ -619,6 +619,8 @@ static Function/WAVE SFH_GetSweepsForFormulaImpl(string graph, WAVE/WAVE selectD colorGroup = GetUniqueInteger() JWN_SetNumberInWaveNote(rangedSweepData, SF_META_COLOR_GROUP, colorGroup) + JWN_SetNumberInWaveNote(rangedSweepData, SF_META_TRACE_MODE, TRACE_DISPLAY_MODE_LINES) + EnsureLargeEnoughWave(output, indexShouldExist = index) output[index] = rangedSweepData index += 1 diff --git a/Packages/tests/Basic/UTF_SweepFormula_Operations.ipf b/Packages/tests/Basic/UTF_SweepFormula_Operations.ipf index b6e91f85b6..c4fae88dfa 100644 --- a/Packages/tests/Basic/UTF_SweepFormula_Operations.ipf +++ b/Packages/tests/Basic/UTF_SweepFormula_Operations.ipf @@ -1576,8 +1576,8 @@ End static Function TestOperationData() variable i, j, numChannels, sweepNo, sweepCnt, numResultsRef, clampMode - string str, strSelect, epochStr, name, trace, wvList - string win, device + string str, strSelect, epochStr, name, trace, wvList, traces, traceInfos + string win, device, winBase variable mode = DATA_ACQUISITION_MODE variable numSweeps = 2 variable dataSize = 10 @@ -1910,6 +1910,22 @@ static Function TestOperationData() PASS() endtry + // check that we use line style even for a couple of points + str = "data(select(selrange([2, 6]), selsweeps(0), selchannels(AD6)))" + winBase = ExecuteSweepFormulaCode(win, str) + win = winBase + "#Graph0" + + traces = TraceNameList(win, ";", 1 + 2) + CHECK_EQUAL_VAR(ItemsInList(traces), 1) + + trace = StringFromList(0, traces) + CHECK_PROPER_STR(trace) + + traceInfos = TraceInfo(win, trace, 0) + CHECK_PROPER_STR(traceInfos) + + CHECK(GrepString(traceInfos, "\bmode\(x\)=0\b")) + // workaround permanent waves being present wvList = GetListOfObjects(GetDataFolderDFR(), "data*") CallFunctionForEachListItem_TS(KillOrMoveToTrashPath, wvList)