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: [mg51828] Re: [mg51795] Null entry in a Graphics list?
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 3 Nov 2004 01:24:02 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

g1 = Plot[Sin[x], {x, 0, 8}];
g2 = Plot[Cos[x], {x, 0, 8}];
g3 := If[test, Plot[x^2/64, {x, 0, 8}], Graphics[{}]];

but this also seems to work...

g3 := If[test, Plot[x^2/64, {x, 0, 8}], {}];
 

test = True;
Show[g1, g2, g3];

test = False;
Show[g1, g2, g3];

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




From: AES/newspost [mailto:siegman at stanford.edu]
To: mathgroup at smc.vnet.net

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: plot variance(s)
  • Next by Date: Re: Null entry in a Graphics list?
  • Previous by thread: Re: Null entry in a Graphics list?
  • Next by thread: Re: Null entry in a Graphics list?