DateAxisItem does not show when inverted

108 views
Skip to first unread message

Kentin Prat

unread,
Mar 17, 2021, 7:56:11 AM3/17/21
to pyqtgraph

My DateAxisItem axis is not displayed when calling the invertY() function. To be precise the values that we would normally see on the axis disappears. It does work if it's a normal AxisItem or if we don't call invertY() but I want it inverted. Here is my code example :

```
import pyqtgraph as pg
from PyQt5.QtWidgets import QApplication

app = QApplication([])
plot = pg.plot()
x = pg.AxisItem(orientation="top")
y = pg.DateAxisItem(orientation="left")
plot.getPlotItem().hideAxis("bottom")
plot.getPlotItem().setAxisItems({"top": x, "left": y})
plot.getPlotItem().getViewBox().invertY(True)
app.exec_()
```

Is it a bug or did I do something wrong ?

Martin Chase

unread,
Mar 18, 2021, 8:21:35 PM3/18/21
to pyqt...@googlegroups.com
On Wed, Mar 17, 2021 at 4:56 AM Kentin Prat <thep...@gmail.com> wrote:

Is it a bug or did I do something wrong ?

 This looks like a bug to me, and I can confirm the behavior on my system. Time, apparently, refuses to run backwards 😁

Would you like the honors of filing an issue? You're most of the way there already.

Kentin Prat

unread,
Mar 19, 2021, 4:03:52 AM3/19/21
to pyqtgraph
Done  DateAxisItem does not show when inverted · Issue #1635 · pyqtgraph/pyqtgraph (github.com) 
Do you have an idea about how I could go around this issue since I don't expect it to be fixed right away ? 
Reply all
Reply to author
Forward
0 new messages