Skip to content

ErrorBarItem does not plot for values smaller than 1e-12 #1149

@jaxankey

Description

@jaxankey

Short description

When I try to plot with error bars having values smaller than 1e-12, they do not show up. No error or warning.

Code to reproduce

import pyqtgraph, numpy

ey = numpy.array([2e-12, 1.1e-12, 1e-12, 0.9e-12])
p = pyqtgraph.plot()
p.addItem(pyqtgraph.ErrorBarItem(x=[0,1,2,3], y=[0,0,0,0], top=ey))

Expected behavior

We should see 4 bars of diminishing height.

Real behavior

We see only the first two.

Tested environment(s)

  • PyQtGraph version: 0.10.0
  • Qt Python binding: PyQt5 5.9.2 Qt 5.9.6
  • Python version: 3.7
  • NumPy version: 1.15.4
  • Operating system: Linux Mint 19
  • Installation method: conda

Additional note

PlotCurveItems appear with crazy small values, well below 1e-12, but their error bars don't. This confused me for a long time!

Thanks in advance, and sorry if this issue is fixed in 0.11 already.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions