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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:47:29+00:00 2026-06-15T12:47:29+00:00

I am plotting scatter plot using ggplot2. When I hide the scales, the plot

  • 0

I am plotting scatter plot using ggplot2. When I hide the scales, the plot automatically because a little big larger. For example:

ggplot(data = iris, geom = 'blank', aes(y = Petal.Width, x = Petal.Length)) + geom_point()

ggplot(data = iris, geom = 'blank', aes(y = Petal.Width, x = Petal.Length)) +
geom_point() +
theme(axis.title.x = element_blank(),
      axis.title.y = element_blank(),
      legend.position = "none")

The second one is larger. How I can avoid it? I only want to hide the scales and the label but keep the plot as the first one because I want to combine the two, one with scale and one without, but keep the plot size the same. 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-06-15T12:47:30+00:00Added an answer on June 15, 2026 at 12:47 pm

    tricky but works. axis in white

    ggplot(data = iris, geom = 'blank', aes(y = Petal.Width, x = Petal.Length)) + geom_point()
    
    + theme (axis.title.x = element_text(family = "sans", face = "bold"))
    ggplot(data = iris, geom = 'blank', aes(y = Petal.Width, x = Petal.Length)) +
      geom_point() +
      theme(axis.title.x = element_text(family = "sans", face = "bold",colour='white'))+
      theme(axis.title.y = element_text(family = "sans", face = "bold",colour='white'))
    

    Edit : general solution

    p1 <- ggplot(data = iris, geom = 'blank', aes(y = Petal.Width, x = Petal.Length)) + geom_point()
    
    p2 <- ggplot(data = iris, geom = 'blank', aes(y = Petal.Width, x = Petal.Length)) +
      geom_point() +
      theme(axis.title.x = element_blank(),
            axis.title.y = element_blank(),
            legend.position = "none")
    
    gA <- ggplot_gtable(ggplot_build(p1))
    gB <- ggplot_gtable(ggplot_build(p2))
    gA$widths  <- gB$widths
    gA$heights <- gB$heights
    
    plot(gA)
    plot(gB)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am plotting a scatter plot on a Basemap. However, the data with this
I am plotting speed/distance data from racing events, using Matplotlib, for example distance vs.
I'm plotting data in Python using matplotlib. I am updating the data of the
I want to make a scatter plot using matplotlib. If I want to use
When plotting multiple data series using both line specification ( X , Y ,
I am plotting a bar graph using core plot for both positive and negative
when plotting my data using gnuplot, I experience that the right border is cut
I'm plotting a bunch of UTM coordinates using a matplotlib.pyplot.scatter. I also have a
I have a set of data that I'm plotting as a scatter graph which
I'm plotting a scatter plot with three columns: Green group: x y pointlabel 48,6

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.