Why do I get "Error updating Line. DataSpace or ColorSpace transform method failed" when I use log-scale, data linking and brushing?
Warning: Error updating Line. DataSpace or ColorSpace transform method failed
Reproduction steps:
1. Run the code below
2. Brush the data in the left axis (linear-scale)
3. Expect the corresponding data points to be highlighted in the right axis (log-scale)
>> X1 = randn(100,1);>> Y1 = randn(100,1);>>>> f = figure;>> a1 = axes('Parent',f,'Position',[0.05 0.1 0.4 0.55]);>> a2 = axes('Parent',f,'Position',[0.55 0.1 0.4 0.55]);>>>> h.fig = f;>> h.ax(1) = a1;>> h.ax(2) = a2;>>>>h.l(1) = plot(h.ax(1), X1, Y1, '.','XDataSource', 'X1');>>h.l(2) = plot(h.ax(2), X1, Y1, '.','XDataSource', 'X1');>> set(h.ax(2), 'XScale', 'log');>>>> linkdata on>> brush on
Best Answer