I have a pairs function in R which is plotting a graphic but the font size is bigger than I would like. Is there any way to reduce it?
Update:
My pairs function:
pairs(~erro_O3_s+erro_NO2_s+O3_ref+NO2_ref, data=person.data,
upper.panel=panel.regression, lower.panel=panel.cor,
pch=20)
I can change the font size with cex
but not the diagonals font size.
How to change font size in r? To change the font size of text, use cex (character expansion ratio). The default value is 1. To reduce the text size, use a cex value of less than 1; to increase the text size, use a cex value greater than 1.
pairs() function in R language is used to return a plot matrix, consisting of scatter plots corresponding to each data frame.
The way to interpret this matrix is as follows: The variable names are displayed on the outer edges of the matrix. The boxes along the diagonals display the density plot for each variable. The boxes in the lower left corner display the scatterplot between each variable.
cex.labels
changes the diagonal font size.
Using the functions from your previous question:
try pairs(mtcars[1:3], upper.panel=panel.regression, lower.panel=panel.cor, cex.labels=1)
and pairs(mtcars[1:3], upper.panel=panel.regression, lower.panel=panel.cor, cex.labels=10)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With