If I use \n
with labs(title="whatever \n comes after this")
I end up with quite a big space between the lines. Is there a way to influence it? (I mean except font-size of the title itself).
相关问题
- R - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
- Reshape matrix by rows
- Extract P-Values from Dunnett Test into a Table by
- split data frame into two by column value [duplica
相关文章
- How to convert summary output to a data frame?
- How to plot smoother curves in R
- Paste all possible diagonals of an n*n matrix or d
- ess-rdired: I get this error “no ESS process is as
- How to use doMC under Windows or alternative paral
- dyLimit for limited time in Dygraphs
- Saving state of Shiny app to be restored later
- How to insert pictures into each individual bar in
you can do something like this ( option lineheight to modify line spacing)
To perfectly center everything (which
\n
will not do in several cases), keep every piece of text the same size or being able to relatively adjust it if there are more than 2 lines (which is useful in some cases) and at the same time being able to adjust the interlinear space, use this instead:Then use
labeller=label_parsed
This also works for
facet_grid
,xlab
andylab
Note the
atop
andtextstyle
to position the text whilst keeping it all the same size and thescriptscriptstyle("")
to control spacing between lines. You can also use varied relative sizes of text usingscriptstyle
orscriptscriptstyle
depending on your needs