// SCI Figure Hub | LabTalk | CC0-1.0 // Save in Origin User Files, then in Script Window run: // run.section(origin-script-tafel-slope.ogs, Main); [Main] // Activate a worksheet with the selected linear fit interval as X (log10 |j|) // in A and overpotential in mV in B. Supply the fit interval before running. plotxy iy:=(1,2) plot:=201; tree fitOptions, fitResults; xop execute:=init classname:=FitLinear iotrgui:=fitOptions; xop execute:=run iotrgui:=fitOptions otrresult:=fitResults; xop execute:=cleanup; xb.text$ = "log |j| (mA cm\+(-2))"; yl.text$ = "Overpotential (mV)"; label -s -n tafel_slope Tafel slope: $(fitResults.Summary.R1.Slope_Value,.2) mV/dec; page.width = 89 / 25.4 * page.resx;