You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error Bars
Having a plot layer l, you can add error bars to a data curve c, named curveName, using the following methods:
err1 = l.addErrorBars(c, Table *t, QString errColName, int type = 1, double width = 1, int capLength = 8, color = Qt.black, throughSymbol = True, minusSide = True, plusSide = True)
err2 = l.addErrorBars(curveName, Table *t, QString errColName, int type = 1, double width = 1, int capLength = 8, color = Qt.black, throughSymbol = True, minusSide = True, plusSide = True)
Each data curve, c, can have attached a list of error bars:
errors = c.errorBarsList()
The properties of an error bar curve can be accesses, via the following methods:
err = c.errorBarsList()[0]
for i in range(0, err.dataSize()):
print err.errorValue(i)
err.capLength()
err.width()
err.color()
err.direction()
err.xErrors()
err.throughSymbol()
err.plusSide()
err.minusSide()
c = err.masterCurve() # reference to the master curve to which the error bars curve is attached.
err.detachFromMasterCurve() # equivalent to c.removeErrorBars(err)
... and can be modified, via the following methods:
err.setCapLength(12)
err.setWidth(3)
err.setColor(Qt.red)
err.setDirection(ErrorBarsCurve.Vertical)
err.setXErrors(True) # equivalent to err.setDirection(ErrorBarsCurve.Horizontal)
err.drawThroughSymbol(True)
err.drawPlusSide(True)
err.drawMinusSide(False)
err.setMasterCurve(c)
You can remove all error bars attached to a curve using:
c.clearErrorBars()
The text was updated successfully, but these errors were encountered:
From qtiplot handbook:
The text was updated successfully, but these errors were encountered: