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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:58:53+00:00 2026-05-23T09:58:53+00:00

Considering : preferred ={{1, 1, 63}, {2, 1, 44}, {3, 1, 27}, {4, 1,

  • 0

Considering :

preferred ={{1, 1, 63}, {2, 1, 44}, {3, 1, 27}, {4, 1, 33}, {5, 1, 33}}

frmWidth  =                 20.9067;
frmHeight =                   15.68;

I am displaying 5 types of stimuli 2 by 2. Subjects must choose the one they prefer. Each type of stimuli is displayed 80 times so :

{1,1,63} indicates that the stimuli Cond 1 was preferred 63 times out of the 80 times it was displayed.
{3, 1, 27} indicates that the stimuli Cond 3 was preferred 27 times out of the 80 times it was displayed.

Cond1 refers to center of the screen

Cond2 refers to Top-Left Quadrant

Cond3 refers to Top-Right Quadrant

Cond4 refers to Bottom-Left Quadrant

Cond5 refers to Bottom-Right Quadrant

I would like to express this showing results.

This is what I have done :

Graphics[{
  Black, EdgeForm[{Thin, LightGray}], 
  Rectangle[{-1, -1}, {frmWidth + 1, frmHeight + 1}], 

  PointSize[0.03],
  Yellow,
  Point@Tuples[{Range[0, frmWidth/2, frmWidth/19], 
  Range[0, frmHeight/2, frmHeight/14]}][[;; preferred[[5, 3]]]],

  Red,
  Point@Tuples[{Range[frmWidth/2, frmWidth, frmWidth/19], 
  Range[0, frmHeight/2, frmHeight/14]}][[;; preferred[[4, 3]]]],

  Green,
  Point@Tuples[{Range[frmWidth/2, frmWidth, frmWidth/19], 
  Range[frmHeight/2, frmHeight, frmHeight/14]}][[;; preferred[[3, 3]]]],

  Orange,
  Point@Tuples[{Range[0, frmWidth/2, frmWidth/19], 
  Range[frmHeight/2, frmHeight, frmHeight/14]}][[;; 
  preferred[[2, 3]]]],

  Blue,
  Point@Tuples[{Range[frmWidth/4, 3/4 frmWidth, frmWidth/19], 
  Range[frmHeight/4, 3/4 frmHeight, frmHeight/14]}][[;; 
  preferred[[1, 3]]]]

  }]

enter image description here

Problem is the rectangles are gradually filled with points from left to right, instead of the points being uniformly located.

Consider the following :

Graphics[{

  White, EdgeForm[Thick], 
  Rectangle[{0, 0}, {frmWidth, frmHeight}],

  Orange, Opacity[.5],
  Rectangle[{0, frmHeight/2}, {frmWidth/2, frmHeight}, RoundingRadius -> 3],

  Green,
  Rectangle[{frmWidth/2, frmHeight/2}, {frmWidth, frmHeight},RoundingRadius -> 3],

  Red,
  Rectangle[{frmWidth/2, 0}, {frmWidth, frmHeight/2}, RoundingRadius -> 3],

  Yellow,
  Rectangle[{0, 0}, {frmWidth/2, frmHeight/2}, RoundingRadius -> 3],

  Blue,
  Rectangle[{frmWidth/4, frmHeight/4}, {3/4 frmWidth, 3/4 frmHeight}, RoundingRadius -> 3]
  }]

enter image description here

Now I would like to fill those edge rounded rectangles with the points but have the density changing rather than the part of the rectangles that are filled.

Below is something very ugly I draw in PPT :

enter image description here

Ideally, the shapes filled with Points could be of any kind.
Points would not overlap.

Please let me know alternative ideas.

  • 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-23T09:58:54+00:00Added an answer on May 23, 2026 at 9:58 am

    OK, try this:

    Manipulate[ld = Floor[Sqrt[n]];
    Graphics[
    {{EdgeForm[Dashed], White, 
      Polygon[{{0, 0}, {0, h}, {w, h}, {w, 0}}]},
     Point[Flatten[#, 1] &@
     Table[{x, y}, {x, 0, w, w/ld}, {y, 0, h, h/ld}]] },
    PlotRange \[Rule] {{-1, 20}, {-1, 20}}],
    {{n, 25}, 10, 100, 1},
    {{h, 10}, 5, 20},
    {{w, 10}, 5, 20}]
    

    typical configuration:

    enter image description here

    (the code I gave lets you control the total number and size of the box via sliders)

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

Sidebar

Related Questions

Which solution should be generally preferred, considering that the change is source compatible? This
From the below 2 ways to enumerate a collection, should one be preferred over
Considering a server that expose a service through WCF. One of the OperationContract return
Considering such code: class ToBeTested { public: void doForEach() { for (vector<Contained>::iterator it =
Considering private is the default access modifier for class Members, why is the keyword
Considering this code, can I be absolutely sure that the finally block always executes,
Considering the following architecture: a base object 'Entity' a derived object 'Entry:Base' and a
Considering the criteria listed below, which of Python, Groovy or Ruby would you use?
Considering a large system with hundreds of assemblies, what is the easiest way to
Considering you have an MVVM Architecture in WPF like Josh Smith's examples How would

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.