Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow curves to be manipulated in Python #3502

Closed
NickDraper opened this issue Mar 16, 2011 · 1 comment
Closed

Allow curves to be manipulated in Python #3502

NickDraper opened this issue Mar 16, 2011 · 1 comment
Milestone

Comments

@NickDraper
Copy link
Contributor

From QTIPLOT handbook:

All the curves in a plot layer can be customized in terms of color, line width and line style. Here's a short script showing the corresponding functions at work:


t = newTable("test", 30, 4)
for i in range(1, t.numRows()+1):
    t.setCell(1, i, i)
    t.setCell(2, i, i)
    t.setCell(3, i, i+2)
    t.setCell(4, i, i+4)

l = plot(t, (2,3,4), Layer.Line).activeLayer() # plot columns 2, 3 and 4
for i in range(0, l.numCurves()):
    l.setCurveLineColor(i, 1 + i) #curve color is defined as an integer value
    l.setCurveLineWidth(i, 0.5 + 2*i)

l.setCurveLineStyle(1, QtCore.Qt.DotLine)
l.setCurveLineStyle(2, QtCore.Qt.DashLine)
@NickDraper NickDraper added this to the Release 2.0 milestone Jun 3, 2015
@NickDraper
Copy link
Contributor Author

This issue was originally trac ticket 2655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant