Hey, Thanks so much. I was pulling hair for days over this and a simple call to autoRange seems to do it. Unsure if useful but in my case the problem only occurs if the X data point count (time period in my case) is the same as previous.
On Saturday, March 21, 2020 at 12:15:27 PM UTC+8, Patrick wrote: > > 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/23d733ad-68d1-41dd-90d7-d0388fd2161f%40googlegroups.com.
