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


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

Re: without individual scaling?

Started byMurray Eisenberg <murray@math.umass.edu>
First post2012-01-18 11:09 +0000
Last post2012-01-18 11:09 +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: without individual scaling? Murray Eisenberg <murray@math.umass.edu> - 2012-01-18 11:09 +0000

#7984 — Re: without individual scaling?

FromMurray Eisenberg <murray@math.umass.edu>
Date2012-01-18 11:09 +0000
SubjectRe: without individual scaling?
Message-ID<jf699r$gfc$1@smc.vnet.net>
How about just plain Row, and if needed, control the size of each 
graphics object in that row by using Show[...., ImageSize -> ... ]. For 
example:

    rose = Import["ExampleData/rose.gif"];
    shuttle = ExampleData[{"Geometry3D", "SpaceShuttle"}];

    Row[{Show[rose, ImageSize -> 100], Show[shuttle, ImageSize -> 200]}]

You can insert space between objects in a Row, if you wish, using Spacer.

On 1/16/12 5:04 PM, David Bevan wrote:
> Hi!
>
> Since asking this question I have discovered GraphicsRow[].
>
> What I need is some way of doing GraphicsRow[objs] but without each graphics getting scaled individually.
>
> Equivalently, I need is some way of doing Show[objs] but with the graphics in a row, not overlaid.
>
> Clearly, Mathematica has the information to do this. Is there no way for a user to access this information?
>
> Thanks.
>
> David %^>
>
> ________________________________________
> From: David Bevan [david.bevan@pb.com]
> Sent: 10 January 2012 10:57
> To: mathgroup@smc.vnet.net
> Subject: Graphics bounding box in source coordinates?
>
> Is there some way of getting the bounding box of Graphics in the source coordinate system? For example, Show can be used to display an array of objects on top of each other:
>
> showObj[z_]:=Graphics[{Circle[{z,z},z]}]
> objs=showObj/@Range[5];
> Show[objs]
>
> But I want to display them side by side. The following can be used to offset each object by a fixed interval:
>
> graphicsArray[g_,x_]:=Graphics[MapIndexed[Translate[#1,{x (First[#2]-1),0}]&,First/@g]]
> graphicsArray[objs,5]
>
> But I would like the gaps between each object to be of fixed size. So I want a version of graphicsArray which determines the value to pass to Translate by getting the bounding box info from each Graphic.
>
> Rasterize[,"BoundingBox"] doesn't help because it returns the size in pixels after scaling:
>
> Rasterize[#,"BoundingBox"]&/@objs
> {{360,359,182},{360,359,182},{360,359,182},{360,359,182},{360,359,182}}
>
> My real objects are more complex than these simple circles (and I want something reusable with different objects).
>
> Thanks for your help (and apologies if I missed something obvious in the documentation).
>
> David %^>
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

[toc] | [standalone]


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


csiph-web