Hi, I don't think this has anything to do with your custom tickStrings etc, it happens with stock pyqtgraph too. I've never dug far enough to find out why, but it's like if you enable autorange, but that doesn't require a redraw, then when data is added to the plot (which does appear in correct location and scale etc) then axes labels don't get updated to match. I work around this in a few different ways depending on how my plots are initialised/used/reset, but in general I think it's either by explicitly calling a manual autoRange <http://www.pyqtgraph.org/documentation/graphicsItems/viewbox.html#pyqtgraph.ViewBox.autoRange> after enableAutoRange or by calling setRange <http://www.pyqtgraph.org/documentation/graphicsItems/viewbox.html#pyqtgraph.ViewBox.setRange> if I know what the initial axes ranges should be.
Patrick On Friday, 20 March 2020 17:04:01 UTC+10:30, Bertram Gilfoyle wrote: > > I have instances where the X axis labels are not updated. In a custom > AxisItem tickStrings is being called and produce the correct axis labels > but are not updated on the chart. I call generateDrawSpecs in the end to > make sure there's an update but still nothing. The correct labels are only > displayed when changing the range. > Is there any way to force a redrawing of the axis labels? > -- 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/28242936-872d-4da9-b3ce-43feef9a71cb%40googlegroups.com.
