Subplot ID in a loop where k> number of plot locations for a single page
Mostrar comentarios más antiguos
Hi, This is a tricky one for me to explain. I have q files, and want to subplot them on a page with 4 locations. Due to considerations for how the figures/pages will be looked at in a pdf I am using a (2,4,q) subplot and plotting a distribution in (2,2,1:2) etc. It would be easier to just have (2,2,q) but they would not look so good in the final pdf.
For q being no higher than 4 I use
subplot(PlotsPerPage/2,PlotsPerPage,[q+q-1, q+q])
which works nicely. But when q>4 it falls over. I think my problem is more of a math issue than matlab but I am hoping that there will be a way to do take use of a matlab function maybe in a way I am not aware of. I can do this longhand by having if statements for when q=5:8 or q=9:12 etc but would like to avoid that as I can see q going to a very high number by the end of the year.
2 comentarios
Jan
el 10 de Abr. de 2017
I'm confused by the question. What does "using a (2,4,q) subplot and plotting a distribution in (2,2,1:2) etc." mean? Do you really mean "subplot(PlotsPerPage/2,PlotsPerPage, [q+q-1, q+q])"? Then the pages contains more plots then PlotsPerPage and for q = 2 you get the position [3, 4]. Sorry, I cannot follow you.
You currently have:
subplot(2,4,q)
What fails for q > 4? Do you want to display 8 diagrams per page? What happens and what do you want to happen?
Stephen Devlin
el 10 de Abr. de 2017
Editada: Stephen Devlin
el 10 de Abr. de 2017
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Subplots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!