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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:07:49+00:00 2026-06-16T05:07:49+00:00

Say if I have a scatter plot: dat = [1+(5-1).*rand(1000,1);89;92]; dat2 = dat+0.2; scatter(dat,dat2);

  • 0

Say if I have a scatter plot:

dat = [1+(5-1).*rand(1000,1);89;92];
dat2 = dat+0.2;
scatter(dat,dat2);

As you can see from the graph there are two points that are much larger than the remainder of the values. Is there a method for obtaining the axis limits for the region where the majority of the values lie?

  • 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-16T05:07:50+00:00Added an answer on June 16, 2026 at 5:07 am

    That depends on your definition of “majority”, but for tasks like this you should usually employ statistical tools, such as mean and std.

    Let’s assume that the majority of points lie within one standard deviation from the mean value. According to this logic, you need to find all the points that fall within that range in the x-axis and in the y-axis:

    xmaj = dat(abs(dat - mean(dat)) < std(dat));
    ymaj = dat2(abs(dat2 - mean(dat2)) < std(dat2));
    

    Now xmaj and ymaj contain the coordinates of the “majority” of points. To get the axis limits of the region that contains the majority of points, just do:

    xlims = [min(xmaj), max(xmaj)]
    ylims = [min(ymaj), max(ymaj)]
    

    For your example, you should something like this:

    xlims =
    
        1.0053    4.9969
    
    
    ylims =
    
        1.2053    5.1969
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say we have two pointers to objects that can contain a property equal and
Say I have this: private list<myClass> myCollection; Is there a programming idiom to shorten
Say I have a list that contains n lists. Is there a neat way
Say I have a Facebook page and there are n number of people who
Say I have two classes like this: class A{ private static Random random =
Say I have the following, is there a way to chain them together, or
Say have a linear model LM that I want a qq plot of the
Say I have two overloaded versions of a C# method: void Method( TypeA a
Say I have the string User Name:firstname.surname contained in a larger string how can
Say I have two gmpy2.mpc objects x and y precise to p bits. When

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.