0
$\begingroup$

We have four disks in a cell which are too far away each other. The Grid has been generated by below code as long as disk and style were defined by

disk = Graphics[{Green, Disk[{1, 1}, Scaled[{.35, .35}]]}]; style = {FontFamily -> "Times", FontSize -> 14, Bold, Blue};

Grid[{

{" ", Style["Number", style]},
   {Style["doubleNumber", style],
 Grid[{{disk, disk}, {disk, disk}}]}},
 Frame -> All, ItemSize -> {{Scaled[.13], Scaled[.09]}, 1},
 FrameStyle -> Directive[Black, Thick]]

enter image description here

The problem is the distance between disks. We so much tried to close all disks as much as possible but we could not do that. I mean we want to approach disk in a distance that are still recognizable. However we used ImagePadding or Offset but we could not reach the desired case. How can we reduce the extra space between disks?

$\endgroup$
  • $\begingroup$ What about Scaled[{.35, .35}]? do you want that 15% margin or not? $\endgroup$ – Kuba Apr 20 '18 at 20:08
  • $\begingroup$ Unfortunately the design of Grid is too complicated. But you can try something like disk=Graphics[{Green,Disk[{1,1},Scaled[.48]]},PlotRange->All]; style={FontFamily->"Times",FontSize->14,Bold,Blue}; Grid[{{" ",Style["Number",style]},{Style["doubleNumber",style], di=Grid[{{disk,disk},{disk,disk}},Spacings->{0,0}(*,Dividers\[Rule]All,*)] }},Frame->All,ItemSize->{{Scaled[.13],Scaled[.37]},1},FrameStyle->Directive[Black,Thick]] $\endgroup$ – Rolf Mertig Apr 20 '18 at 20:15
  • $\begingroup$ This earlier question Grid - sizing and spacing problems with spanning cells might give some ideas to deal with Grid challenges. $\endgroup$ – Jagra Apr 20 '18 at 20:25
  • $\begingroup$ Kuba, We just reduce the extra space between disks without increasing size of the cell. The suggestion way by @Rolf, changes the size of the cell. As well as the size of disks are Ok. we are not trying to reduce their size. $\endgroup$ – Unbelievable Apr 20 '18 at 20:26
  • $\begingroup$ I have used: dotSizes = {40}; dots = Graphics[{Pink, Disk[]}, ImageSize -> #] & /@ dotSizes; by help of @Jagra $\endgroup$ – Unbelievable Apr 20 '18 at 20:47
2
$\begingroup$

Still not exactly certain what you want to achieve, but the following might give some ideas to do it:

disk = Graphics[{Green, Disk[{1, 1}]}, 
   ImageSize -> 40];
style = {FontFamily -> "Times", FontSize -> 14, Bold, Blue};

Grid[{
  {" ", Style["Number", style]},
  {Style["doubleNumber", style],

   Grid[{
     {disk, disk},
     {disk, disk}}]
   }
  },
 Frame -> All,   
 FrameStyle -> Directive[Black, Thick]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.