Get Offset of Trace in Graph

Function GetTraceOffset(graphName, traceName, instance, which)
    String graphName    // "" for top graph
    String traceName
    Variable instance   // Usually 0
    Variable which      // 0 for X, 1 for Y
   
    String info= TraceInfo(graphName,traceName, instance)
   
    String offsets = StringByKey("offset(x)",info,"=",";") // "{xOffset,yOffset}"
   
    Variable xOffset,yOffset
    sscanf offsets, "{%g,%g}",xOffset,yOffset
   
    if (which)
        return yOffset
    endif
    return xOffset
End

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More