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 6800437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:58:08+00:00 2026-05-26T18:58:08+00:00

I wanted to make a simple R plot with y-axis labels centered above the

  • 0

I wanted to make a simple R plot with y-axis labels centered above the y-axis tick labels. I created something I liked with the code below. But it required some fumbling with the at graphical parameter.

Q: Is there a less hacky way of doing this? Is there a way to query the y-axis tick labels for their width so that I could use that information to center the y-axis label above them?

set.seed(1)
n.obs       <- 390
vol.min     <- .20/sqrt(252 * 390)
eps         <- rnorm(n = n.obs, sd = vol.min)
windows(width = 5.05, height = 3.8)
plot(eps,  main  =  "Hello  World!", las=1, ylab="")
mtext(text="eps", side=3, at=-60)

my plot

  • 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-26T18:58:08+00:00Added an answer on May 26, 2026 at 6:58 pm

    You can get the extent of the user coordinates with `par(“usr”) and then convert the units of margins. You have added an extra wringle by making the plot area non-standard. On a standard 7 x 7 device this works:

    mtext(text="eps", side=3, at=usrcoord.x.left-0.075*diff(range(par("usr")[1:2]) ))
    

    But on your smaller plot window, you need to use:

    mtext(text="eps", side=3, at=usrcoord.x.left-0.1*diff(range(par("usr")[1:2]) ))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to make a simple chart of users that have been created in
This might be a simple question but I just wanted to make sure I
I wanted to make some simple file recovery software, where I want to try
I wanted to make Map of Collections in Java, so I can make something
This might be a stupid question but I just wanted to make sure... If
before posting the whole code, i wanted to make sure I am not missing
I wanted to make simple form, without awesome div's and CSS - it structure
I'm making an in webpage cache system. I wanted to make a simple page
I wanted to make a simple average (mean) function in Haskell, so I tried
i wanted to make a simple data entry application. So i did the following

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.