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

  • Home
  • SEARCH
  • 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 6371253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:02:19+00:00 2026-05-25T01:02:19+00:00

I know it is going to be quick and simple for some of you.

  • 0

I know it is going to be quick and simple for some of you. I just want to have a horizontal y axis label using mtext(). It has to do with adj I guess, but I have been wasting the last 2 hours trying to figure it out…
In the following examples, I just want the y-labels (myLab) to be horizontal and left justified.

myLab <- c("aaaaaaa", "bb", "c")

par(oma=c(0,10,0,0)) # make a large left maring for the labels

plot(x=c(1:3),
     y=c(1:3),
     pch="|",
     lwd=3,
     tck=0.01,
     yaxt="n",
     ylab="",
     xlab="my legend",
     at= c(1:3),
     )


mtext(text=myLab,
      side=2,
      outer = FALSE,
      at=c(1:3)
      )

I do not need to use mtext(). If you have a better alternative, please let me know.

Thanks!

  • 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-25T01:02:20+00:00Added an answer on May 25, 2026 at 1:02 am

    Use the las argument:

    mtext(text=myLab, las=1,
           side=2,
           outer = FALSE,
           at=c(1:3)
           )
    

    Brings them right up the edge but you can pad with trailing spaces in the myLab values. You can left justify using an adj value of 0 (versus the default value of 1):

     plot(x=c(1:3),
          y=c(1:3),
          pch="|",
          lwd=3,
          tck=0.01,
          yaxt="n",
          ylab="",
          xlab="my legend"  # removing extraneous `at` value that only throws a warning
          )
     mtext(text=myLab, las=1, adj=0,
            side=2,
            outer = FALSE,
            line=3.5, at=1:3
            )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is going to be something simple that I'm just missing somehow,
I have some simple shell scripting tasks that I want to do For example:
a quick, simple question from me about for-loops. Situation I'm currently writing some high-performance
I have this extremely simple splash page here: http://iph0wnz.com It has the main graphic
Could someone have a quick glance at this code and let me know where
Just a quick question for folks who know a bit of c. Whats the
I'm using a built-in benchmarking module for some quick and dirty tests. It gives
Quick note: I'm using the SoundPool class http://developer.android.com/reference/android/media/SoundPool.html What I have here is a
I know I'm going to get flamed for this, but.... I have table ProductA,
Does anyone know what's going to be in the next version of jquery (1.3.3

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.