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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:22:44+00:00 2026-05-25T17:22:44+00:00

Based on Sjoerd, great solution and extension on From Cartesian Plot to Polar Histogram

  • 0

Based on Sjoerd, great solution and extension on From Cartesian Plot to Polar Histogram using Mathematica, please consider the Following :

list = {{21, 16}, {16, 14}, {11, 11}, {11, 12}, 
        {13, 15}, {18, 17}, {19, 11}, {17, 16}, {16, 19}}

ScreenCenter = {20, 15}

ListPolarPlot[{ArcTan[##], EuclideanDistance[##]} & @@@ (# - ScreenCenter & /@ list), 
              PolarAxes -> True, PolarGridLines -> Automatic, Joined -> False, 
              PolarTicks -> {"Degrees", Automatic}, 
              BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold, 
              FontSize -> 12}, PlotStyle -> {Red, PointSize -> 0.02}]

enter image description here

Module[{Countz, maxScale, angleDivisions, dAng},
        Countz = Reverse[BinCounts[Flatten@Map[ArcTan[#[[1]] - ScreenCenter[[1]], #[[2]] - 
                 ScreenCenter[[2]]] &, list, {1}], {-\[Pi], \[Pi], \[Pi]/6}]];
        maxScale = 4;
        angleDivisions = 12;
        dAng = (2 \[Pi])/angleDivisions;

SectorChart[{ConstantArray[1, Length[Countz]], Countz}\[Transpose],
             SectorOrigin -> {-\[Pi]/angleDivisions, "Counterclockwise"},
             PolarAxes -> True,
             PolarGridLines -> Automatic,
             PolarTicks -> {Table[{i \[Degree] + \[Pi]/angleDivisions,i \[Degree]}, 
             {i, 0, 345, 30}], Automatic},
             ChartStyle -> {Directive[EdgeForm[{Black, Thickness[0.005]}], Red]}, 
             BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold, 
             FontSize -> 12}, ImageSize -> 400]]

enter image description here

As you can see the histogram shows a rotational symmetry of what it should.
I tried everything to get those straight but did not succeed. Without Reverse it is worst. I tried RotateRight without success.I feel the problem is in my BinCount.
ArcTan output from -Pi to Pi whereas Sjoerd suggested I needed to go from 0 to 2Pi. But I don`t understand how to do so.

EDIT : Problem solved. Thanks to Sjoerd, Belisarius, Heike solutions, I am able to show a histogram of the eye fixations locations given the center of gravity of an image.

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-25T17:22:45+00:00Added an answer on May 25, 2026 at 5:22 pm

    You could use the ChartElementFunction option to position the sectors accurately. The first argument of ChartElementFunction is of the form {{angleMin, angleMax}, {rMin,rMax}}. The first sector has bounds {angleMin, angleMax} = {-Pi/12, Pi/12}, the second one {Pi/12, 3 Pi/12}, etc. Therefore, to get the right rotation you could do something like

    Module[{Countz, maxScale, angleDivisions, dAng},
     maxScale = 4;
     angleDivisions = 12;
     dAng = (2 \[Pi])/angleDivisions;
     Countz = BinCounts[
       Flatten@Map[ArcTan @@ (# - ScreenCenter) &, list, {1}], 
        {-Pi, Pi, dAng}];
    
     SectorChart[{ConstantArray[1, Length[Countz]], Countz}\[Transpose], 
      SectorOrigin -> {-\[Pi]/angleDivisions, "Counterclockwise"}, 
      PolarAxes -> True, PolarGridLines -> Automatic, 
      PolarTicks -> {Table[{i \[Degree] + \[Pi]/angleDivisions, 
          i \[Degree]}, {i, 0, 345, 30}], Automatic}, 
      ChartStyle -> {Directive[EdgeForm[{Black, Thickness[0.005]}], Red]},
      BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold, FontSize -> 12}, 
      ImageSize -> 400,
    
      ChartElementFunction -> 
       Function[{range}, Disk[{0, 0}, range[[2, 2]], - 11 Pi/12 + range[[1]]]]]]
    

    enter image description here

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

Sidebar

Related Questions

Based on: MVC Html.CheckBox and form submit issue Let's consider following example. View: <%
Based on their work, how do you distinguish a great SQL developer? Examples might
Based on the privacy requirements from the ios store, can we include analytics like
Based on code suggestions here at stackoverflow, I've tried to extract an image from
Based on the function below, it is used to load data from file .dat.
Based on This solution I am trying to develop a script that would limit
based to your experience, what kind of technical solution will you apply to build
Based on the following XML, what is the best way to achieve an alphanumeric
Based on info in the following question REST Content-Type: Should it be based on
Based on some other code I found from this site (This Question here -

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.