From: Anamika on 3 Jun 2010 19:49 Hi Jan, I am actually thinking of the second option. Instead of randomizing, I will load an array that contains the x and y limits for each of the subplot that I want (I have just posted a question to the forum a few minutes ago about this.) Thanks for your input! Will make a note of your point about the SUBPLOT. Best, Mika > ??? Or: > ylimit = rand(160, 2); > for k = 1:160 > AxisH = subplot(40, 40, k); > set(AxisH, 'YLim', ylimit(k, :)); > end > > BTW: The creation of 160 subplots is much faster if you avoid the command SUBPLOT, which searchs for overlapping existing axes objects. > > Jan
From: Steven Lord on 3 Jun 2010 21:36 "Anamika " <Anamika.Darwin(a)gmail.com> wrote in message news:hu9f1g$ht5$1(a)fred.mathworks.com... > Hi Jan, > > I am actually thinking of the second option. Instead of randomizing, I > will load an array that contains the x and y limits for each of the > subplot that I want (I have just posted a question to the forum a few > minutes ago about this.) Others have shown you the set(graphicsHandle, 'YLim', ...) approach. Just FYI, there's a helper function for that: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/xlim.html This documentation page covers not only XLIM but also YLIM and ZLIM, even though the URL only mentions XLIM. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Anamika on 3 Jun 2010 21:55 Hi Steven, Thank you for your input. I checked the link. One question though. I was able to incorporate all of the suggestions for my subplot code. However, I find the width (on the screen) of every plot irrespective of the upper limit for the X-axis is the same. For e.g. 1st Plot's limits are: 'YLim', [0 100], 'XLim', [0 925] 2nd: 'YLim', [0 100], 'XLim', [0 625] ...... I want to make sure that the scale is maintained throughout the subplots. (I have set 'XLimMode', 'manual'). "Steven Lord" <slord(a)mathworks.com> wrote in message <hu9l9v$a9s$1(a)fred.mathworks.com>... > > "Anamika " <Anamika.Darwin(a)gmail.com> wrote in message > news:hu9f1g$ht5$1(a)fred.mathworks.com... > > Hi Jan, > > > > I am actually thinking of the second option. Instead of randomizing, I > > will load an array that contains the x and y limits for each of the > > subplot that I want (I have just posted a question to the forum a few > > minutes ago about this.) > > Others have shown you the set(graphicsHandle, 'YLim', ...) approach. Just > FYI, there's a helper function for that: > > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/xlim.html > > This documentation page covers not only XLIM but also YLIM and ZLIM, even > though the URL only mentions XLIM. > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > To contact Technical Support use the Contact Us link on > http://www.mathworks.com >
From: us on 3 Jun 2010 22:05
"Anamika " <Anamika.Darwin(a)gmail.com> wrote in message <hu9mdq$nro$1(a)fred.mathworks.com>... > Hi Steven, > > Thank you for your input. I checked the link. One question though. I was able to incorporate all of the suggestions for my subplot code. However, I find the width (on the screen) of every plot irrespective of the upper limit for the X-axis is the same. > > For e.g. > 1st Plot's limits are: > 'YLim', [0 100], 'XLim', [0 925] > 2nd: > 'YLim', [0 100], 'XLim', [0 625] > ..... > > I want to make sure that the scale is maintained throughout the subplots. (I have set 'XLimMode', 'manual'). of course... now, this is a different story: - either shrink/expand the AXES using its POSITION prop/val - or set the XLIMs to be equal as well us |