MathGroup Archive 2004

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

Search the Archive

Re: Null entry in a Graphics list?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51856] Re: [mg51795] Null entry in a Graphics list?
  • From: Yasvir Tesiram <tesiramy at omrf.ouhsc.edu>
  • Date: Wed, 3 Nov 2004 01:26:22 -0500 (EST)
  • References: <200411020705.CAA21665@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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: Null entry in a Graphics list?
  • Next by Date: Re: Re: Hide Mathematica kernel window
  • Previous by thread: Null entry in a Graphics list?
  • Next by thread: Re: Null entry in a Graphics list?