Skip to content

Lightcuve.plot(witherrors=True) does not plot error bars #928

@dhuppenkothen

Description

@dhuppenkothen

Description of the Bug

I got a bug report from a colleague that using the plot function in Lightcurve with the witherrors=True option does not, in fact produce error bars.

I reproduced the issue using the minimum example below.

Steps/Code to Replicate the Bug

time = np.arange(100)
counts = np.random.poisson(400, size=len(time))
lc = Lightcurve(time, counts, err_dist="poisson")

lc.plot(witherrors=True)

Expected Results

I expected something akin to this:

Image

Actual Results

The code produces the following plot, which is not what we'd expect.

Image

I suspect something might have gone wrong when that functionality moved to the StingrayTimeseries superclass and somehow the if-statement that would produce the error bars no longer is executed correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt's a bug! Unexpected or unwanted behavior.help wantedWe need additional help with these issues!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions