I just Read from an old post that the problem of the samll axis appering in
the corner can be solved modifyint the code in plotItem.py line 170 as
follows:
for k, pos in (('top', (1,1)), ('bottom', (3,1)), ('left', (2,0)),
('right', (2,2))):
* if k in axisItems:*
* axis = axisItems[k]*
* else:*
axis = AxisItem(orientation=k, parent=self)
axis.linkToView(self.vb)
self.axes[k] = {'item': axis, 'pos': pos}
self.layout.addItem(axis, *pos)
axis.setZValue(-1000)
axis.setFlag(axis.ItemNegativeZStacksBehindParent)
Does it continues being valid or have been updated?
Le mercredi 17 août 2016 10:58:28 UTC+2, [email protected] a écrit :
>
> Hello,
>
> I am making an application that adds plots from data selected in a
> QListWidget.
> Each time that I press plot, a new subplot is added to the
> GraphicsLayoutwidget
>
> I define the axis configuration in this function:
>
> def FormatAxis(self):
> global frVec3rdOct
> global frXAxis
> global frYAxis
> global rpmXAxis
> global rpmYAxis
>
> frXAxis=pg.AxisItem(orientation='bottom')
> frYAxis=pg.AxisItem(orientation='left')
>
> frXAxis.setLabel(text='Freq 1/3 Oct',units='Hz')
> frYAxis.setLabel(text='SPL',units='dB(A)')
> frXAxis.setGrid(255)
> frYAxis.setGrid(255)
>
> rpmXAxis=pg.AxisItem(orientation='bottom')
> rpmYAxis=pg.AxisItem(orientation='left')
>
> rpmXAxis.setLabel(text='Engine Speed',units='RPM')
> rpmYAxis.setLabel(text='SPL',units='dB(A)')
> rpmXAxis.setGrid(255)
> rpmYAxis.setGrid(255)
>
> And each time that I add a nex plot I do it in this way:
>
> self.wm2=self.pg.GraphicsLayoutWidget.addPlot(row=1, col=0,
> title = 'Group 2',axisItems={'bottom':rpmXAxis,'left':rpmYAxis})
> self.wm2.addLegend()
>
> The strange behaviour is:
>
> - It appears two small axes in the corner of the plots
> - In some of them the grid is plotted, In some of the dont
> - Some liked axis stop working (not all!)
> - In the plots in log format the plot is replotted on top when I change
> from one tab to other...
>
> Any ideas??? Is a bug or I am doing somethinh wrong??
>
>
> <https://lh3.googleusercontent.com/-MkNUkhUWu8s/V7QnKrY3oyI/AAAAAAAAAz8/m7A3lrqKyBI4NCKW2fWmtb3-iXjzj7pigCLcB/s1600/Capture.PNG>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyqtgraph/ab4458b1-f841-435b-995a-01b75de3634e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.