Log scale error bars

232 views
Skip to first unread message

Aaron Adamson

unread,
Feb 19, 2014, 5:21:08 PM2/19/14
to pyqt...@googlegroups.com
I'm trying to add error bars to my log-scale plot - they show up accurately when I use a linear scale, but they both appear at a value of 1 (on the y-scale) when I change to a log plot, and don't change when data is updated.

It looks like maybe the errorBarItem isn't made to handle log scale - could you point me in the right direction for modifying the class, or is it planned to add log-scale compatibility in a later release?

Luke Campagnola

unread,
Feb 24, 2014, 12:01:57 PM2/24/14
to pyqt...@googlegroups.com
On Wed, Feb 19, 2014 at 5:21 PM, Aaron Adamson <were...@gmail.com> wrote:
I'm trying to add error bars to my log-scale plot - they show up accurately when I use a linear scale, but they both appear at a value of 1 (on the y-scale) when I change to a log plot, and don't change when data is updated.

It looks like maybe the errorBarItem isn't made to handle log scale - could you point me in the right direction for modifying the class, or is it planned to add log-scale compatibility in a later release?

You are correct--ErrorBarItem does not support log scaling. To get started on this, you would need:

1. ErrorBarItem.setLogMode(x, y). This will be called by the PlotItem when the error bar is first added and whenever the log scaling mode changes.
2. ErrorBarItem.paint() must draw the error bars taking the x/y log modes into account.

Let me know if you need more help with this!

Ian Hill

unread,
Jun 25, 2015, 10:21:58 PM6/25/15
to pyqt...@googlegroups.com
I'm facing the same issue and wondering if any progress was made here?

Aaron Adamson

unread,
Aug 17, 2015, 11:29:13 AM8/17/15
to pyqtgraph
So, I've got ErrorBarItem modified to support log scaling (mostly). One of the things I'm hung up on though: It seems to me that the beams on the error bars ought to be transform invariant, or at least have the option for it. I'm not sure how to make that happen only for the beams though.

Trifon Trifonov

unread,
Jan 10, 2019, 11:42:09 AM1/10/19
to pyqtgraph
Dear Luke,

I know this is old post but can you provide an example how this works? I need the data and the error bars to behave the same way.
Actually I think in the plot() you really must include the error bars. data without error bars is meaningless.

ErrorBarItem is not very flexible i am afraid (see my post https://groups.google.com/forum/#!topic/pyqtgraph/ZAx1fiNGg4Y)

Thanks,
Trifon
Reply all
Reply to author
Forward
0 new messages