Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6963517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:48:09+00:00 2026-05-27T15:48:09+00:00

Is it possible to add more than one x-axis to a plot in R?

  • 0

Is it possible to add more than one x-axis to a plot in R? And to put an annotation next to each scale?

Edit > here’s the result of Nick Sabbe idea. For the annotation (a little text at the left of each axis), is it possible ?

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:48:09+00:00Added an answer on May 27, 2026 at 3:48 pm

    You can use the line argument of axis() to place an axis higher or lower, this way you can make multiple axes. With mtext() you can then add a label to the side. Do note that the plot itself is only on one scale so you need to rescale the points and labels of the other scale accordingly:

    # Plot and first axis:
    plot(1:10,1:10,bty="n",col="red",pch=16,axes=FALSE,xlab="",ylab="")
    axis(2,0:11,las=1)
    axis(1,0:11,line=1,col="red",col.ticks="red",col.axis="red")
    mtext("Label 1",1,line=1,at=0.2,col="red")
    
    # Secondary points and axis:
    points(rnorm(10,50,20)/10, rnorm(10,5,2),pch=16, col="blue" )
    axis(1,0:11,labels=0:11*10,line=3,col="blue",col.ticks="blue",col.axis="blue")
    mtext("Label 2",1,line=3,at=0.2,col="blue")
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Under a corporate apple developer account, is it possible to add more than one
Is it possible to add more than one instances of Static HTML: iframe tabs
Is it possible to use Django's user authentication features with more than one profile?
Can any one help me to add more than one custom button to the
Is it possible to add more than 1 subviews to a given window. Eg.
Hi is it possible to have more than one group as admin_group? being able
Is it possible to place more than one object (which represent TreeViewer selections) into
How to add multiple views in one template of django ? Is it possible
Is it possible to remove than add back click event to specific element? i.e
Is it possible to add three JTextFields inside of one cell in a Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.