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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:51:16+00:00 2026-06-11T16:51:16+00:00

I just came by the following plot: And wondered how can it be done

  • 0

I just came by the following plot:

alt text

And wondered how can it be done in R? (or other softwares)

Update 10.03.11: Thank you everyone who participated in answering this question – you gave wonderful solutions! I’ve compiled all the solution presented here (as well as some others I’ve came by online) in a post on my blog.

  • 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-11T16:51:17+00:00Added an answer on June 11, 2026 at 4:51 pm

    Make.Funny.Plot does more or less what I think it should do. To be adapted according to your own needs, and might be optimized a bit, but this should be a nice start.

    Make.Funny.Plot <- function(x){
        unique.vals <- length(unique(x))
        N <- length(x)
        N.val <- min(N/20,unique.vals)
    
        if(unique.vals>N.val){
          x <- ave(x,cut(x,N.val),FUN=min)
          x <- signif(x,4)
        }
        # construct the outline of the plot
        outline <- as.vector(table(x))
        outline <- outline/max(outline)
    
        # determine some correction to make the V shape,
        # based on the range
        y.corr <- diff(range(x))*0.05
    
        # Get the unique values
        yval <- sort(unique(x))
    
        plot(c(-1,1),c(min(yval),max(yval)),
            type="n",xaxt="n",xlab="")
    
        for(i in 1:length(yval)){
            n <- sum(x==yval[i])
            x.plot <- seq(-outline[i],outline[i],length=n)
            y.plot <- yval[i]+abs(x.plot)*y.corr
            points(x.plot,y.plot,pch=19,cex=0.5)
        }
    }
    
    N <- 500
    x <- rpois(N,4)+abs(rnorm(N))
    Make.Funny.Plot(x)
    

    EDIT : corrected so it always works.

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

Sidebar

Related Questions

I just came across the following code: for(Iterator<String> iterator = stuff.iterator(); iterator.hasNext();) { ...
I just came accross the following code in an existent project, which I'm working
I came across an approach to encode just the following 4 characters in the
Just came across this by Chris Coyier - http://css-tricks.com/examples/CSSTabs/ Can anyone explain me, how
Just came across an issue with my Wordpress template that I can't figure out.
I am just starting to use UML and have came to the following question:
I was just digging through some JavaScript code (Raphaël.js) and came across the following
Just started with developing for WP7 and came across the following. I have a
Hey I just came across the following statement return name != null ? name
Just started to learn C and came across the following issue: I need to

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.