plot(x, y) #default is blue solid line
plot(x, y, 'r*') #red star mark
plot(x, y, 'go-') #green line with circle markers
plot(x, y, 'ks:') # black dotted line with square markers
Basic color format commands for plotting with the PyLab library
colour |
|
‘b’ |
blue |
'g' |
green |
'r' |
Red |
'c' |
Blue |
'm' |
quality |
'and' |
yellow |
'k' |
black |
'w' |
White |
Basic line format commands for plotting with the PyLay library
line type |
|
'-' |
solid line |
'--' |
dotted line |
':' |
Dotted line |
Basic drawing marker formatting commands for drawing with the LyLab library
mark |
|
'.' |
point |
'O' |
circle |
's' |
square |
'*' |
star |
'+' |
plus |
'x' |
Cross |
PlotDataItem plot line format command
line type |
|
dotted line -- |
QtCore.Qt.DashLine |
solid line - |
QtCore.Qt.CustomDashLine |
Dotted line.- |
DashDotLine |
Dotted line. |
DotLine |
dotted line..- |
DashDotDotLine |
custom dotted line |
CustomDashLine |
eg:
self.curveLowerLimit=pg.PlotDataItem()
# Dotted line DashLine -- , solid line SolidLine - , dotted line DashDotLine, dotted line DotLine, dotted line DashDotDotLine, custom dotted line CustomDashLine
# pen = pg.mkPen(color="w" , width=1, style=QtCore.Qt.CustomDashLine)
# pen.setDashPattern([1, 4, 5, 4])
pen = pg.mkPen(color="w", width=1,style=QtCore.Qt. DashLine)