       Re: Re: Null entry in a Graphics list?

• To: mathgroup at smc.vnet.net
• Subject: [mg51885] Re: [mg51856] Re: [mg51795] Null entry in a Graphics list?
• From: "Tom Aldenberg" <Tom.Aldenberg at rivm.nl>
• Date: Thu, 4 Nov 2004 01:49:51 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

What I do is wrap every Graphics[ ] thing into list braces: g1={Graphics
[ ]}, g2 = {Graphics[ ]}, etc
The empty Graphics is then the empty list: g3 = {}.
Combining graphics is easy through g123=Join[g1,g2,g3], which gives
{-Graphics-,-Graphics-}

Show[g123] accepts a list of -Graphics-.

Tom Aldenberg

Subject: [mg51885]  [mg51856] Re: [mg51795] Null entry in a Graphics list?

Hi,

Graphics[Line[{{0, 0}, {0, 0}}]]

should serve as an adequate "Null" graphic.

e.g.
<< Graphics`Graphics`
<< Graphics`Colors`

g1 = Graphics[{Red, Line[{{0, 1}, {1, 0}}]}];
g2 = Graphics[{Blue, Line[{{-1, 0}, {0, 1}}]}];
g3[x_] :=
If[x < 1, Graphics[{Gold, Circle[{0, 0}, x]}],
Graphics[{Green, Line[{{0, 0}, {0, 0}}]}]];

Show[g1, g2, g3[1.3]]

Yas

On Tue, 2 Nov 2004, AES/newspost wrote:

> Is there a "Null" or a "None" for Graphics?
>
> If I want to accomplish something like
>
>     g1 = Graphics[---];
>     g2 = Graphics[---]
>     g3 = If[test, Graphics[---], NoGraphics ];
>
>     Show[g1, g2, g3 ];
>
> is there something I can put in for "NoGraphics" (other than an
> offscreen Point or a zero-size Point or . . . ) that will be acceptable
> in subsequent graphics commands
>

```

• Prev by Date: Re: Garbage collection problem
• Next by Date: Re: How to force Mathematica to treat a number as positive and real?
• Previous by thread: Re: Null entry in a Graphics list?
• Next by thread: Graphics and Random[] questions