Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13925 > unrolled thread

Re: Arranging graphics objects (disks) in rows

Started byBob Hanlon <hanlonr357@gmail.com>
First post2013-03-25 03:23 +0000
Last post2013-03-25 03:23 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Arranging graphics objects (disks) in rows Bob Hanlon <hanlonr357@gmail.com> - 2013-03-25 03:23 +0000

#13925 — Re: Arranging graphics objects (disks) in rows

FromBob Hanlon <hanlonr357@gmail.com>
Date2013-03-25 03:23 +0000
SubjectRe: Arranging graphics objects (disks) in rows
Message-ID<kiofvk$3c5$1@smc.vnet.net>
Manipulate[Grid[Partition[
   Join[Graphics[{
        Darker[Green], Disk[],
        Text[
         Style[#, Orange, "Label", 24],
         {0, 0}]}] & /@ Range[n],
    Table["", {9}]],
   10], ItemSize -> 3],
 {{n, 1, "Number\nof Disks"}, 1, 20, 1,
  Appearance -> "Labeled"}]


Bob Hanlon


On Sun, Mar 24, 2013 at 4:17 AM, Clif McInnis <c_mcinnis@hotmail.com> wrote:
> I am trying to get the following code to produce two rows of numbers disks.  I would like the program to fill the first row and then wrap to the second row (like words wrap when writing a sentence). The code works well until it reaches the end of the first row at which point it drops 6 disks to the second row and starts filling the rows erratically. I have looked into the properties of Rows, Panes, and GraphicRows (which produced very unsatisfactory results as it greatly reduced the size of each succeeding disk) but have not been able to come up with a code that works better than the one below.
>
> Manipulate[Pane[Row[Table[Graphics[{
>       Darker[Green],
>       Disk[{0, 0}, .5],
>       Text[Style[numerals[[ r]], Orange, "Label", 24], {0, 0}]}], {r,
>      1, n}]], {925, 200}], {n, 1, 20, 1}, Initialization :> (
>    numerals = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10",
>       "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"};)]
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web