Code covered by the BSD License  

Highlights from
Scrollsubplot

4.75

4.8 | 4 ratings Rate this file 17 Downloads (last 30 days) File Size: 4.44 KB File ID: #7730
image thumbnail

Scrollsubplot

by Bjorn Gustavsson

 

26 May 2005 (Updated 27 May 2005)

scrollsubplot(n,m,p) p<0 and p>nm, Extends subplot to infinite canvas ...

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

SCROLLSUBPLOT Create axes in tiled positions.

SCOLLSUBPLOT(m,n,p), breaks the Figure window into
an m-by-n matrix of small axes, selects the p-th axes for the current plot, and returns the axis handle. The axes are counted along the top row of the Figure window, then the second row, etc. For example,

    SCROLLSUBPLOT(3,1,-1), PLOT(income)
    SCROLLSUBPLOT(3,1,1), PLOT(declared_income)
    SCROLLSUBPLOT(3,1,2), PLOT(tax)
    SCROLLSUBPLOT(3,1,3), PLOT(net_income)
    SCROLLSUBPLOT(3,1,4), PLOT(the_little_extra)

plots declared_income on the top third of the window, tax in the middle, and the net_income in the bottom third. Above the top of the figure income is ploted and below the lower edge
the_little_extra is to be found. To navigate there is a slider along the right figure edge.

The function works well for regular grids where m,n is constant for all p. When m,n varies there is no guaranti that the steps of the slider is nicely adjusted to the sizes of the subplots.

Differences with SUBPLOT: SCROLLSUBPLOT requires 3 input arguments, no compatibility with subplot(323), no handle as input. Further PERC_OFFSET_L is decreased from 2*0.09 to 0.07
and PERC_OFFSET_R is decreased from 2*0.045 to 0.085. This leaves less space for titles and labels, but give a plaid grid of subplots even outside the visible figure area.

Bug/feature when the slider is shifted from its initial position and then extra subplots is added, they get mis-positioned.

See also SCROLL, SUBPLOT,

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Scrolling Plot Demo, Scrolling Figure Demo

MATLAB release MATLAB 6.5.1 (R13SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
11 Oct 2005 reno renovic

I may be helpfull if you would add a little example how to use this m.file

18 Nov 2006 Telmo Amaral

This function did precisely what I needed in the easiest possible way: just had to replace all the calls to subplot with calls to scrollsubplot. Particularly liked the fact that page-up/down scroll the defined number of rows, whereas arrow-up/down scroll only one row at a time - very intuitive.

20 Nov 2007 David Escot

Perfect!!

01 May 2009 Carlos Martinez-Ortiz  
19 Apr 2011 Alexander Brodsky

can you add ability of mouse scrolling ?
Thanks for useful feature

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
annotation Bjorn Gustavsson 22 Oct 2008 07:49:22
customization Bjorn Gustavsson 22 Oct 2008 07:49:22
subplot Bjorn Gustavsson 22 Oct 2008 07:49:22
scroll axes Bjorn Gustavsson 22 Oct 2008 07:49:22
tiled Bjorn Gustavsson 22 Oct 2008 07:49:22
breaks Bjorn Gustavsson 22 Oct 2008 07:49:22
plot Bjorn Gustavsson 22 Oct 2008 07:49:22
graphics Bjorn Gustavsson 22 Oct 2008 07:49:22
window Bjorn Gustavsson 22 Oct 2008 07:49:22
pick of the week Lindsay Coutinho 02 Dec 2011 12:02:23
potw Lindsay Coutinho 02 Dec 2011 12:02:23
scroll axes David 16 Dec 2011 02:11:53

Contact us at files@mathworks.com