|
"Juliette Salexa" <juliette.physicist@gmail.com> wrote in message <h35cvr$63s$1@fred.mathworks.com>...
> for i=1:25
> subplot(5,5,i);
> differences=rand(1,6) ; bar(differences); title(i);
> end
>
> If you run that code above you'll notice that the numbers run from top left corner, to the right, and then down to the next row and to the right again.
>
> If want them running from top left corner DOWN to the to bottom left, then up to the first row of the next column again.
>
> Basically I want the transpose of the digram that is generated by the code above.
>
> Is there a way ??
>
> Thanks
> xoxo
Hi,
By default subplot works in row wise but if you need to have in column wise
You can do this way.....
idx = reshape(1:25,5,[])'
idx=idx(:);
for i=1:25
subplot(5,5,idx(i));
differences=rand(1,6) ; bar(differences); title(i);
end
Hope this helps .....
Shan......
|