Reputation: 10176
I'd like to do the following:
I have about 200 datasets which I'd like to plot in a figure. The complete data alldata
roughly looks like:
x1 y1 ones(length(x1),1)
x2 y1 2*ones(length(x2),1)
x3 y3 3*ones(length(x3),1)
...
xN yN N*ones(length(xN),1)
whereas xi/yi are vectors of the same length. Let's call the third column flag
.
I always want to plot the lines in the figure where the flag is 1/2/3. I do this by selecting them one after the other (simply via data = alldata(find(alldata(:,3)==1/2/3 (in 3 steps)), [1, 2])
) and plotting them via plot(data(:,1), data(:,2))
.
But because there are so many other lines to be plotted, thus I somehow (I'm looking for a quick and easy way to do this) want to have the possibility to always ONLY show let's say the next 5 lines plotted and then somehow be able to scroll through and always show the next 5 or the previous 5 lines depending on which action I take.
Do you know any easy way to do this quickly? Do you know any toolbox or so, didn't find anything on the matlab file exchange?
I know certainly how to code it myself: I'd introduce a slider and depending on the slider position I'd always plot the lines with the flag 3+(i-1)*5
to 3+i*5
into a plot.
But maybe you know something quicker/easier :)
EDIT: thinking about it now after having written this post, it may even have been quicker to really do this GUI with a simple slider and a callback function myself as it's probably to specific to have a quick solution in the file exchange!? Thanks though!!
Upvotes: 2
Views: 501
Reputation: 419
If you use the plot browser mode you can select multiple lines at a time and click the check box to display or not display the lines.
I believe you can select blocks of lines and then check their boxes together. This would mean you could view the 5 lines at a time you mention with only 3 or 4 mouse clicks. This GUI tool can be very helpful for interactively picking through plots of large data sets.
The specification for this tool is given here
Upvotes: 1