Increase caption size for the plots

I have two questions regarding the figure captions to be appearing in the centre of thefigure/plot.

  1. If I use fig.cap in the chunk parameters like this

`{r label1, fig.cap="Figure 1"}

This is very small in size and doesn't look so clear. How to increase this font size?

  1. When I used this below code in the Rmd text (not a chunk code), it works great, size and the centre position is okay, but how to make it conditional, how to put conditions for this line to be printed accordingly?
**Figure 7: Elbow plot**

Hello, welcome to the forum.
First click on Tools, then on Global options (In the upper side), finally, click on appearance. Then you will have the possibility of changing, font size, zoom, editor theme and so on.
This video explain almost the same.

Hope this helps.

No, its not about rstudio attributes. I am running it on the server.

I think it would depend on if you are making an HTML or a pdf, but heres a link
r - Set caption font size for figures in YAML header of Rmarkdown - Stack Overflow

I am making an html and want to execute via these chunks because I have multiple conditions to be used.

`{r label1, fig.cap=" Figure 1 "}

If theres a way to increase the fig.cap size from here, it will be really great to know.

another link, more specific for html

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.