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


Groups > comp.soft-sys.math.mathematica > #2169

Re: bug... GraphicsGrid ItemAspectRatio Spacings

From "Christopher O. Young" <cy56@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: bug... GraphicsGrid ItemAspectRatio Spacings
Date 2011-05-07 11:34 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <iq3aof$fjn$1@smc.vnet.net> (permalink)
References <gaqfju$e2u$1@smc.vnet.net>

Show all headers | View raw


It looks like Spacings has to be set to some value(s) given in typesetters
"points" (1/72 of an inch), if we want to set ItemAspectRatio to a list.

GraphicsGrid[
 {
  {
   "Z-coordinate",
   "Radius"
   },
  {
   Slider[Dynamic[h], {-2, 2, 0.25}, Appearance -> "Labeled"],
   Slider[Dynamic[r], {0, 1, 0.25}, Appearance -> "Labeled"]
   },
  {
   Graphics[
    Locator[Dynamic[s]],
    PlotRange -> 2,
    Frame -> True,
    Axes -> True
    ],
   Dynamic[
    Graphics3D[
     Sphere[{s[[1]], s[[2]], h}, r],
     PlotRange -> 2,
     Axes -> True,
     AxesLabel -> {"x", "y", "z"}
     ]
    ]
   }
  },
 ItemAspectRatio -> {0.05, 0.05, 1},
 Dividers -> {All, {True, False, True, True}},
 Spacings -> {100, 10}
 ]


On 9/17/08 4:37 AM, in article gaqfju$e2u$1@smc.vnet.net, "Mitch Murphy"
<mitch@lemma.ca> wrote:

> FYI for poor souls that might encounter that same problem i just did.
> 
> if you use ItemAspectRatio option for GraphicsGrid, you also need to
> specify the Spacings option.
> 
> GraphicsGrid[{{"foo"}, {Graphics@Rectangle[]}}, Frame -> All,
> ItemAspectRatio -> {.1, 1}]
> 
> gives errors ...
> 
> Coordinate {189., {-19.2, -19.2}} should be a pair of numbers, or a
> Scaled or Offset form.
> Coordinate {360., {35.99999999999999, 14.399999999999999`}} should be
> a pair of numbers, or a Scaled or Offset form.
> Coordinate {189., {-230.4, -230.39999999999998`}} should be a pair of
> numbers, or a Scaled or Offset form.
> Coordinate {360., {381.59999999999997`, 360.}} should be a pair of
> numbers, or a Scaled or Offset form.
> 
> 
> GraphicsGrid[{{"foo"}, {Graphics@Rectangle[]}}, Frame -> All,
> ItemAspectRatio -> {.1, 1}, Spacings -> 2]
> 
> ... works OK.
> 
> 
> 
> cheers,
> Mitch
> 

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: bug... GraphicsGrid ItemAspectRatio Spacings "Christopher O. Young" <cy56@comcast.net> - 2011-05-07 11:34 +0000

csiph-web