# Change Colors of Axis Labels & Values of Base R Plot (2 Examples)

In this R tutorial you’ll learn how to modify the colors of axis labels and values in a plot.

You’re here for the answer, so let’s get straight to the examples!

## Creation of Example Plot (Default Colors)

As a first step, let’s create a scatterplot in Base R using the default specifications:

`plot(1:10) # Plot with default colors` As shown in Figure 1, we created a black and white graphic with the previously shown syntax.

Let’s change the colors of our plot…

## Example 1: Changing Color of Axis Labels in Base R Plot

In this example, I’ll explain how to adjust the axis label colors of our example plot by applying the col.lab argument.

Have a look at the following R code:

`plot(1:10, col.lab = "red") # Plot with red axis labels` The output of the previously shown code is shown in Figure 2 – A scatterplot with red axis labels (i.e. the names of our axes).

Let’s change more colors…

## Example 2: Changing Color of Axis Values in Base R Plot

In this example, I’ll show how to modify the color of our axis values using the col.axis argument.

`plot(1:10, col.axis = "red") # Plot with red axis values` As shown in Figure 3, we created an xy-plot with red axis values with the previous syntax.

## Video, Further Resources & Summary

Do you need more info on the R syntax of this page? Then you could watch the following video of my YouTube channel. I’m explaining the content of this tutorial in the video.

Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party. If you accept this notice, your choice will be saved and the page will refresh.

In addition, you could read the other articles of this website. A selection of articles about similar topics such as lines, labels, numeric values, and ggplot2 is listed below:

You learned in this article how to adjust axis colors in a plot in the R programming language. Let me know in the comments below, in case you have any further questions.

Subscribe to the Statistics Globe Newsletter

• Philip E Rynes
May 29, 2021 9:03 pm

I am using labels that are dates and would like to alternate colors to emphasize year over month names