Need clarification between GraphicsLayoutWidgetwidget.addplot and addwidget

17 views
Skip to first unread message

fscl...@gmail.com

unread,
Aug 18, 2016, 7:33:45 AM8/18/16
to pyqtgraph
Hello,

As you can toice from my previous messages I'm not a programmer and new in Python. A "good piece of meat" let's say.

I am having troubles with AxisItems, and reviewing the previous posts most of you plot in this way:

    layout = pg.GraphicsLayoutWidget
    P = pg.PlotWidget(name=name)
    layout.addWidget(P,row,column)
    
    Px = P.plot()
    Px.setPen(color, width=.5)
    P.setLabel('left', ylabel,**labelStyle)


While what I am doing is

    w1=layout.addPlot(row=0, col=0, title = 'Group 1',axisItems={'bottom':rpmXAxis,'left':rpmYAxis})
    w1.addLabel()
    w1.plot(x,y,pen=color(*colcode),name="plot")

Is the same to add a PlotWidget to a LayoutWidget and then plot than add a Plot to a layoutwidget by means addplot()?
Reply all
Reply to author
Forward
0 new messages