Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errorbar do not has horizontal line #93

Open
Gery111 opened this issue Jan 26, 2020 · 2 comments
Open

errorbar do not has horizontal line #93

Gery111 opened this issue Jan 26, 2020 · 2 comments
Labels

Comments

@Gery111
Copy link

Gery111 commented Jan 26, 2020

Hi,

I found something wrong in error bar.
For example,
x=abs([-1:0.4:0,-1:0.4:1,0.2:0.4:1]); y=rand(1,12); err=rand(1,12); tag0=cell(3,1);tag0=cellfun(@(x) 'a',tag0,'UniformOutput',false); tag1=cell(3,1);tag1=cellfun(@(x) 'b',tag1,'UniformOutput',false); tag=[tag1;tag0;tag0;tag1]; g=gramm('x',x,'y',y,'ymin',y-err,'ymax',y+err); g.facet_wrap(tag); g.geom_line; g.geom_interval('geom','errorbar'); g.draw;
You can see that the errorbar do not has the horizontal line.
If we just change the tag like:
tag=[tag1;tag1;tag0;tag0];
or change the x like:
x=-1:0.2:1.2;
It's going to be normal now.

@Gery111 Gery111 changed the title error 偶发 errorbar do not has horizontal line Jan 26, 2020
@piermorel piermorel added the bug label May 7, 2020
@piermorel
Copy link
Owner

Hi @Gery111,

You are using a pretty vicious dataset ! The bug seems related to the functionality that "dodges" graphical elements so that they are not superimposed. Your code specifically generates multiple error bars at the same x location which are however in the same data group, with x data that is additionally not ordered. I'll look into it !

@Gery111
Copy link
Author

Gery111 commented May 20, 2020

Hi @piermorel

Thank you.
Actually, the way of the simulated data is like my real data. Those two error bars at same x location are in the different group, which I didn't show it here. Because it's no horizontal line, error bars are overlaped, and I can't discriminate the error bars from two groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants