Open StephenGerry opened 4 years ago
Apologies, these are the chunk options I used {r, fig.cap='Figure 1', fig.subcap=c('a','b','c'), fig.ncol=1, out.height='30%', fig.align='center'}
I can reproduce the issue. I guess the Latex code generated is not quite right for this usage.
Do you know how to produce such vertically centered aligned figure in Latex using \subfloat
? If so it could help us know what to do, otherwise I'll look into it.
Thanks very much Christophe. I am no Latex expert I'm afraid! But this link (https://tex.stackexchange.com/questions/457917/subfloat-vertical-alignment) implies that the problem is something to do with using '\newline' between the subfloats. Replacing 'newline' with the double backslash in the tex file does indeed seem to work.
I am using fig.subcap to create sub-figures, which normally works really well. But when the figures do not fill the full width of the page I'd like to centre the combined image. However using fig.align='center' does not centre all of the subfigures properly.
Here is an example: