开发者

Is there a replacement for MATLAB's errorbar plot which allows brushing of data?

开发者 https://www.devze.com 2023-04-11 09:24 出处:网络
As noted in the documentation, MATLAB\'s brush does not work with errorbar plots (see section Plot Types You Ca开发者_开发知识库nnot Brush). For example,

As noted in the documentation, MATLAB's brush does not work with errorbar plots (see section Plot Types You Ca开发者_开发知识库nnot Brush). For example,

figure;
errorbar((1:10)+2*sin(.3:.3:3),cos(1:1:10)/2);
hold all;
plot(10:-1:1,'o-g');
brush

generates a plot where I can brush data points from the green plot, but not from the red errorbar plot:

Is there a replacement for MATLAB's errorbar plot which allows brushing of data?

Update

Ideally I would like to find a way to retroactively make plots with error bars brushable, short of extracting XData and YData and recreating a graph with plot.

Failing that, is there a function to replace errorbar which allows this for plots I create in the future?


Plot objects created via line are not brushable, but those created via plot are. Since both objects are of type line, I suspect the difference might be on the level of Java.

However, this suggests a workaround: You can write a version of errorbar that uses the line command instead of the plot command to draw the errorbars, thus allowing you to browse just the plot.

0

精彩评论

暂无评论...
验证码 换一张
取 消