Rank: 1083 based on 124 downloads (last 30 days) and 1 file submitted
photo

Aditya

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Aditya
Updated   File Tags Downloads
(last 30 days)
Comments Rating
03 Jun 2013 Screenshot Spaceplots Customize spaces between subplots in a figure Author: Aditya subplots, figure, tight, inset, space, subplot 124 12
  • 4.54545
4.5 | 12 ratings
Comments and Ratings by Aditya View all
Updated File Comments Rating
31 May 2013 Spaceplots Customize spaces between subplots in a figure Author: Aditya

With v3.0, the earlier errors with legend and colorbars will now disappear!

17 Apr 2012 tight subplot Fills the figure with axes subplots with easily adjustable margins and gaps between the axes. Author: Pekka Kumpulainen

Hey,

Great function. Pity I came across it after I spent much of my time writing a similar function. As some people have said above, I wanted the function to work with multiple rows/columns spanning subplots. So I included that capability in the following function:

http://www.mathworks.com/matlabcentral/fileexchange/35464-spaceplots

Just thought it might be useful to some.

17 Apr 2012 Spaceplots Customize spaces between subplots in a figure Author: Aditya

Hi Ralph,

Thanks for your feedback. I've updated the file with your suggestion and a couple of minor fixes.

I'm curious though, I've never had the problem you mentioned during my use. Comparing floats is bound to crash when you are comparing values of two variables that have been computed. But in this case essentially it is the exact same value assigned to the variables being compared, in which case there should be no problem.

05 Mar 2012 An improved subplot function An improved subplot function Author: Eran Ofek

Great function!

However, like Hakon, I wanted to be able to use it on the merged plots. Also, I wanted to use the standard Matlab functions as much as possible to draw the plot before applying the resize.

So I wrote a little function:
http://www.mathworks.in/matlabcentral/fileexchange/35464-spaceplots

Maybe that will help.

Comments and Ratings on Aditya's Files View all
Updated File Comment by Comments Rating
31 May 2013 Spaceplots Customize spaces between subplots in a figure Author: Aditya Aditya

With v3.0, the earlier errors with legend and colorbars will now disappear!

03 Apr 2013 Spaceplots Customize spaces between subplots in a figure Author: Aditya A., Christine

For those who get the error
"Attempted to access GridLeft...index must be a positive integer or logical", you need to call spaceplots BEFORE changing axis ticks, or adding colorbar, etc... For example for the colorbar, try

a1=subplot(2,1,1);scatter(rand(10,1),rand(10,1),5,rand(10,1))
a2=subplot(2,1,2); scatter(rand(10,1),rand(10,1),5,rand(10,1))
spaceplots
axes(a1); colorbar
axes(a2); colorbar

08 Jan 2013 Spaceplots Customize spaces between subplots in a figure Author: Aditya simbarashe

Outstanding!

04 Jan 2013 Spaceplots Customize spaces between subplots in a figure Author: Aditya Bryan

When I use image or imagesc with a colour bar I get the following error:

Attempted to access GridLeft(0,4); index must be a positive integer or logical.

Error in spaceplots (line 228)
axLeft = GridLeft(r0,c0) + InsetLeft(r0,c0);

Try this code as an example:

figure;
for i = 1:8
subplot(2, 4, i);
imagesc(rand(100, 10));
colorbar;
end;
spaceplots([.01 .01 .01 .01], [.02 .02]);

26 Dec 2012 Spaceplots Customize spaces between subplots in a figure Author: Aditya Laurent

Contact us