Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: RE: Co-Displaying Combinatorica and Graphics Objects

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69281] Re: RE: [mg69251] Co-Displaying Combinatorica and Graphics Objects
  • From: Bruce Colletti <vze269bv at verizon.net>
  • Date: Tue, 5 Sep 2006 05:30:50 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

David

Happy to oblige and in the process of doing so, discovered the problem (the code below now works).  

The culprit was that the option CenteredGraphicDisplayFunction (now in Show) had been used in ShowGraph (this option had worked for an earlier application in which the graphics stood alone).  This nonstandard option is implemented from code received a few years ago from Tech Support.

Bruce

------------------------ 


$TextStyle = {FontFamily -> "Arial"};

g = FromOrderedPairs[{{1, 2}, {1, 3}, {1,
 4}, {2, 4}, {3, 4}, {4, 3}}, Type -> Directed]; 

X = {{0, 1, 1, 1}, {0, 0, 0, 1}, {0, 0, 0, 1}, {0, 0, 1, 0}};

g2 = Graphics@Text[MatrixForm@MatrixForm@X, {0, 0}];

g1 = ShowGraph[g, 
    VertexNumber  -> On, VertexNumberPosition -> {.1, 0}, PlotRange -> 
        All, ImageSize -> 200, DisplayFunction -> Identity];

Show[GraphicsArray@{g1, g2}, DisplayFunction -> CenteredGraphicDisplayFunction];


=====================
From: David Park <djmp at earthlink.net>
To: mathgroup at smc.vnet.net
Subject: [mg69281] RE: [mg69251] Co-Displaying Combinatorica and Graphics Objects

Bruce,

Why don't you give us a complete specific example so that we don't have to
make one up? That increases the change of obtaining an answer.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



From: Bruce Colletti [mailto:vze269bv at verizon.net]
To: mathgroup at smc.vnet.net

Re Mathematica 5.2.0.0 under WinXP.

Let G1 be a (Combinatorica) Graph object (e.g., G1 = FromOrderedPairs[...]).

Let G2 be any Graphics object, e.g., G2 = Graphics[...].

I want to display G1 and G2 side-by-side via Show@GraphicsArray@{G1, G2},
but can't figure it out:

- G1 isn't a Graphics object (and so my command fails).

- I can display G1 via G3 = ShowGraph@G1, but then Show@GraphicsArray@{G3,
G2} fails (G3 is a symbol).

- Hoping to piece together a Graphics object from FullGraphics@G1, I am
stumped by the embedded Rule object.

Any ideas on how to display these two objects in an array?

Thankx.

Bruce


  • Prev by Date: Re: Problem with using /.
  • Next by Date: Re: Re: generalized foldlist problem - part 2
  • Previous by thread: RE: Co-Displaying Combinatorica and Graphics Objects
  • Next by thread: comboboxes and paste to notebook