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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:01:05+00:00 2026-05-26T08:01:05+00:00

I have a scatter-plot with many values on a polar axis – coord_polar() .

  • 0

I have a scatter-plot with many values on a polar axis – coord_polar(). The resulting graph has crowded text because the text is always aligned with the bottom of the page.

Is it possible to place the text so that it is printed radially along the polar x-axis?


Edited to provide an example:

qplot(data=presidential, name,end) + coord_polar()

In the presidential case I would like to see the presidential names angled to align with the axis/spoke they are on. Below is an example of the graph I am working on where the x axis is categorical and the y-axis is a continuous variable (similar to the example).

enter image description here

  • 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-26T08:01:06+00:00Added an answer on May 26, 2026 at 8:01 am

    here is a not elegant example of the coordinate:

    CoordPolar2 <- proto(CoordPolar, {
      objname <- "polar2"
      guide_foreground <- function(., details, theme) {
        theta <- .$theta_rescale(details$theta.major, details)
        labels <- details$theta.labels
    
        # Combine the two ends of the scale if they are close
        theta <- theta[!is.na(theta)]
        ends_apart <- (theta[length(theta)] - theta[1]) %% (2*pi)
        if (ends_apart < 0.05) {
          n <- length(labels)
          if (is.expression(labels)) {
            combined <- substitute(paste(a, "/", b), 
              list(a = labels[[1]], b = labels[[n]]))
          } else {
            combined <- paste(labels[1], labels[n], sep="/")
          }
          labels[[n]] <- combined
          labels <- labels[-1]
          theta <- theta[-1]
        }
    
        grobTree(
          if (length(labels) > 0) {
            lab <- theme_render(
              theme, "axis.text.x", 
              labels, 0.45 * sin(theta) + 0.5, 0.45 * cos(theta) + 0.5,
              hjust = 0.5, vjust = 0.5,
              default.units="native"
            )
            lab$rot <- (pi/2 - theta) / pi * 180
            lab
          },
          theme_render(theme, "panel.border")
        )
      }
    })
    
    coord_polar2 <- CoordPolar2$build_accessor()
    
    p <- qplot(data=presidential, name,end) + coord_polar2()
    print(p)
    

    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 have a scatter plot in R (with ggplot2). The data has a numeric
i have a scatter plot graph i would like each dot to have a
I have a scatter plot with 10 points, some points are above and below
I have thousands of points to Plot on a JFreeChart scatter plot. The problem
I'm trying to generate a linear regression on a scatter plot I have generated,
I have a simple scatter plot x<-rnorm(100) y<-rnorm(100) z<-rnorm(100) I want to plot the
I would like my Scatter graph I am making with Core Plot library to
I have an x-y scatter plot in MATLAB and want to put a data
I have function which performs scatter plot and I want to paste the results(Jpeg
I have a 2D scatter plot in MATLAB. Is it possible to interpolate 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.