Skip to content

Add option to hide grid on minor ticks #3250

@mfeingesicht

Description

@mfeingesicht

Short description

I have recently updated from PyQtGraph version 0.13.3 to version 0.13.7. Users of the software I write have noticed that the plots using version 0.13.7 now have vertical/lines for all minor ticks instead of only major ticks as in version 0.13.3. Would it be possible to have the option to hide the grid on minor ticks ?

Code to reproduce

import pyqtgraph as pg
from PyQt5.QtGui import QGuiApplication

# Create window
win = pg.GraphicsLayoutWidget(show=True)
win.setWindowTitle('pyqtgraph example: Scrolling Plots')

# Add plot
axis = win.addPlot(1, 1, pen=pg.mkPen(color='#000000'))

# Show grid
axis.showGrid(x=True, y=True)

QGuiApplication.exec_()

Tested environment(s)

  • PyQtGraph version: 0.13.3 (grid only on major ticks), 0.13.7 (grid on major and minor ticks)
  • Qt Python binding: PyQt5 5.15.6 Qt 5.15.2
  • Python version: 3.10.1
  • NumPy version: 1.26.4
  • Operating system: Windows 10
  • Installation method: pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions