Problem 2403. Best Square-Shaped Grid for Subplot
If you have x number of plots, find the optimum 'm' number of rows and 'n' number of columns for subplotting where the overall figure looks square-shaped. (m*n >= x)
Example:
x = 7 --> m = 3, n = 3
Solution Stats
Problem Comments
-
4 Comments
Show
1 older comment
Omer
on 8 Jul 2014
hello Ned. if you have 5 plots 3*2 grid subplotting will look better. similarly if x = 11, 4*3 subplot will look better shape. for some instances m=n for some not. thats the tricky part of the question :)
Alfonso Nieto-Castanon
on 8 Jul 2014
I imagine that you could more precisely define what the "optimum" solution you are after is by saying something along the lines of "the solution that leaves the least empty plots while keeping the difference between the number of rows and columns to 1 or less"?
Omer
on 10 Jul 2014
Alfonso you're right. The optimum word could have been elaborated like that. I appreciate your effort.
Solution Comments
Show commentsProblem Recent Solvers34
Suggested Problems
-
299 Solvers
-
Omit columns averages from a matrix
595 Solvers
-
488 Solvers
-
748 Solvers
-
211 Solvers
More from this Author6
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!