raacampbell / shadedErrorBar

Produce elegant shaded error bars in MATLAB
GNU Lesser General Public License v3.0
174 stars 70 forks source link

Interpolating around NaNs #10

Closed aloleary93 closed 1 year ago

aloleary93 commented 6 years ago

Hi there,

The script seems to interpolate around NaN values so that the error bar patch forms a continuous area. Is there a way to avoid this? I.e. present NaN values as discontinuous gaps in the shaded error bar?

Best,

Alice

raacampbell commented 6 years ago

Yeah... I know. How are you supplying the data? e.g. do you gave a matrix of some sort which contains the odd NaN then you see them when the function calculates the mean and standard error?

cremy33 commented 1 year ago

Hello,

I have the same issue as Alice. Is there a way to avoid the interpolation around NaN values ? I use vectors for the x, y and errBar parameters.

Best, Rémy

raacampbell commented 1 year ago

I think at the moment the best thing is to pre-process data so that NaNs don't appear. I don't really know what more to say because there are multiple reasons why NaN happen. In some situations you might want to interpolate through them. In others not. Since you have vectors for all parameters, this should be possible for you (if I understand correctly).