Using clickableLegend() with Errorbar() for Interactive Data Highlighting and Display
Mostra commenti meno recenti
I've run into an issue using clickableLegend() which I have found to be very useful for interactively highlighting and displaying data on a single figure. The original version has an error which is addressed in the attached clickableLegend2() script, as described in the discussion section for this function.
I have encountered an error while trying to use clickableLegend() with errorbar() instead of plot():
Here is an example recreating the error, which does not happen when plot() is used instead of errorbar():
clear all;close all;
z = peaks(100);
errorbar(z(:,26:5:50),z(:,26:5:50)*.1)
grid on;
axis manual;
clickableLegend({'Line1','Line2','Line3','Line4','Line5'}, 'Location', 'NorthWest');
----------------
Error Message:
Index exceeds the number of array elements. Index must not exceed 0.
Error in clickableLegend (line 91)
set(objhan(i), 'HitTest', 'on', 'ButtonDownFcn',...
Any Help resolving this would be much appreciated!
Thanks
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Errorbars in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!