[inf] to reference last trace added to graph
Fri, 04/05/2019 - 01:56 am
I often find myself trying to modify the appearance of a trace just after adding it to a graph. For this, I'd like an easy way to reference the last trace that was added to a graph.
Unless I'm missing something, the following doesn't work as expected:
Modifygraph lsize[inf] = 5
Right now, I'm using something like
win = selectstring(paramisdefault(win),win,"")
return stringfromlist(itemsinlist(TraceNameList(win, ";", 1))-1, TraceNameList(win, ";", 1))
but this is slow because of the string parsing.
Is there a better way? I understand that I could just extract the number of traces in the graph to save a bit of the string parsing, and use the  syntax instead of the () syntax, but this is still tedious.
For the wishlist, I'd like to suggest: Have [inf] reference the last added trace.