How to change Xlab, Ylab and XY axis color values ​​and font size in R-graphics

I would like to change the color and font size:

  • Xlab
  • Ylab,
  • X and Y axis values
  • Panel border (color)

in graph R Is there a way to do this?

+4
source share
2 answers

Here, the code demonstrates some of the lower-level building functions that provide the kind of fine-grained control you want. Additional pages are available on the help pages of several functions.

plot(rnorm(99), bty="n", axes=FALSE, xlab="", ylab="") box(col="dodgerblue") axis(1, col="dodgerblue", col.ticks="green", col.axis="orange", cex.axis=2) axis(2, col="dodgerblue", col.ticks="green", col.axis="orange", cex.axis=0.8) mtext("Index", side=1, line=3, col="red", cex=2) mtext("Value", side=2, line=3, col="purple", cex=0.8) 

(The resulting plot is ugly so that I run the code myself and not play it here!)

+11
source

Check out the "par" help page, as well as the corresponding Quick-R tutorials, for an overview of the options that you can change to decorate or annotate the underlying R chart.

+4
source

Source: https://habr.com/ru/post/1412705/


All Articles