Skip to content

Plot Options -> Average invokes thick pen plotting slow path #2040

@pijyoi

Description

@pijyoi

Short description

Since #2011, thick pen plotting has become more usable. Plot Options -> Average uses a pen that is not supported by #2011, resulting in a very slow plot.

Code to reproduce

Run examples/crosshair.py.
On the upper plot, right-click -> context menu -> Plot Options -> Average -> check average

Expected behavior

No slow-down

Real behavior

Panning (amongst other operations) will become very slow, to the extent of being unusable.

Tested environment(s)

  • PyQtGraph version: git ef458d3
  • Qt Python binding: PyQt6 6.2.0
  • Python version: 3.10.0
  • NumPy version: 1.21.3
  • Operating system: Windows 10
  • Installation method: pip install -e .

Additional context

In pyqtgraph/graphicsItems/PlotItem/PlotItem.py, a shadow pen of color (0, 0, 0, 100), width=3 is created. Non-opaque pens are not supported by #2011, hence the slow-down.

Not sure what visual effect a non-opaque black pen is supposed to achieve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions