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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:03:09+00:00 2026-05-26T19:03:09+00:00

I tried simply plotting some data in R with the y-axis label horizontal and

  • 0

I tried simply plotting some data in R with the y-axis label horizontal and left of the y-axis tick labels. I thought the code below would work:

set.seed(1)
n.obs       <- 390
vol.min     <- .20/sqrt(252 * 390)
eps         <- rnorm(n = n.obs, sd = vol.min)
mar.default <- c(5,4,4,2) + 0.1
par(mar = mar.default + c(0, 4, 0, 0))               # add space to LHS of plot
pdf("~/myplot.pdf", width=5.05, height=3.8)
plot(eps,  main  =  "Hello  World!", las=1, ylab="") # suppress the y-axis label
mtext(text="eps", side=2, line=4, las=1)             # add horiz y-axis label
                                                     # 4 lines into the margin

my image

Instead, as you may see, the y-axis label almost fell completely outside of the graphics window. This phenomenon still exists no matter how much I expand the LHS margin.

Q: What am I doing wrong? Is there something I need to do with the oma parameter? What do I need to do to plot things the way I’m intending? I’m a little overwhelmed by all of this!

  • 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-26T19:03:10+00:00Added an answer on May 26, 2026 at 7:03 pm

    This is a classic one, maybe should be a FAQ. You have to set the par settings after the call to pdf, which creates the plotting device. Otherwise you’re modifying the settings on the default device:

    set.seed(1)
    n.obs       <- 390
    vol.min     <- .20/sqrt(252 * 390)
    eps         <- rnorm(n = n.obs, sd = vol.min)
                  # add space to LHS of plot
    pdf("~/myplot.pdf", width=5.05, height=3.8)
    mar.default <- c(5,4,4,2) + 0.1
    par(mar = mar.default + c(0, 4, 0, 0)) 
    plot(eps,  main  =  "Hello  World!", las=1, ylab="") # suppress the y-axis label
    mtext(text="eps", side=2, line=4, las=1)   
    dev.off()
    

    enter image description here

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

Sidebar

Related Questions

I've tried many functions already, but I simply can't figure this out. The right
Anybody tried here using Getting Real(37Signals) approach to develop windows application? (C#/.NET). Or simply
I've tried many variations of this command: idle.py -e filepath , but it simply
I tried simply: public class UIDemoComponent extends UIComponentBase { private String someVariable; // this
I have some code that looks like my ($ids,$nIds); while (<myFile>){ chomp; $ids.= $_
When plotting a function using Plot, I would like to obtain the set of
I've compiled an assembly for MySql.Data.dll and would like to add it to a
I am currently learning F# and have tried (an extremely) simple example of FizzBuzz.
I am using Visual Studio 2008 Express and I tried creating a simple console
I tried to make a simple contact form via HTML and PHP but the

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.