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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:24:05+00:00 2026-05-23T12:24:05+00:00

I am generating a figure that will be used as a column of labels

  • 0

I am generating a figure that will be used as a column of labels to the right of a three-panel figure, and I would like the title of the figure to right-align as do the labels in the figure itself.

here is a minimal example in which I would like to right-align the title ‘words’.

ggplot() + 
  geom_text(aes(y = 1, x = seq(4), 
                label = c('fee', 'fi', 'fo', 'fum'), 
                hjust = 1)) +      
  opts(title = 'words') + 
  coord_flip() + 
  scale_y_continuous(breaks = c(0,0), limits = c(0,1)) 

Which produces this:

enter image description here

update

The answer by @joran is helpful, but it does not align the words with the labels. changing his code from hjust=1 to hjust = 0.96 gets close, but this is more of a hack than a satisfying answer.

  • 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-23T12:24:05+00:00Added an answer on May 23, 2026 at 12:24 pm

    You can do that with the following:

    opts(plot.title = theme_text(hjust=1))
    

    More generally, here is a reasonably complete list of things that can be altered via opts and you can see some example code running through some of these options at Hadley’s site here, particularly the section on ‘polishing’. Even better would be to buy his book.

    Note: Since version 0.9.2 opts has been replaced by theme:

    theme(plot.title = element_text(hjust = 1)) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When generating VS2010 targets with CMake, I would like the /LTCG flag turned on
I am generating a report with that will have a 7 columns where the
I have three different models that will be involved with this. I am trying
I'm generating dynamic types using ILGenerator.Emit. I am generating a method body that will
I have functions that contribute to small parts of a figure generation. I'm trying
Am generating a hidden fields like so: @helper.input(_form(userID), '_label-> None) { (id, name, value,
I'm trying to figure out if it's possible when you are dynamically generating assemblies,
I'm trying to write a command that will delete all functions in a namespace.
I'm trying to figure out how and why my images will only load in
edit I do not want to redirect pages, specific files etc. I would like

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.