Re: Null entry in a Graphics list?
- To: mathgroup at smc.vnet.net
- Subject: [mg51812] Re: [mg51795] Null entry in a Graphics list?
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Wed, 3 Nov 2004 01:23:24 -0500 (EST)
- References: <200411020705.CAA21665@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 2 Nov 2004, at 16:05, 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 > > The empty list {} should work. For example: g1 = Plot[ x^2, {x, -1, 1}, DisplayFunction -> Identity]; g2 = Plot[x^3, {x, -1, 1}, DisplayFunction -> Identity]; g3 := If[t, g1, {}] t = True; Show[g3, g2, DisplayFunction -> $DisplayFunction] (two graphs) t=False; Show[g3,g2,DisplayFunction->$DisplayFunction] (one graph) Andrzej Kozlowski Chiba, Japan http://www.akikoz.net/~andrzej/ http://www.mimuw.edu.pl/~akoz/
- References:
- Null entry in a Graphics list?
- From: AES/newspost <siegman@stanford.edu>
- Null entry in a Graphics list?