Re: Null entry in a Graphics list?
- To: mathgroup at smc.vnet.net
- Subject: [mg51836] Re: [mg51795] Null entry in a Graphics list?
- From: DrBob <drbob at bigfoot.com>
- Date: Wed, 3 Nov 2004 01:24:41 -0500 (EST)
- References: <200411020705.CAA21665@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
For example:
Needs["Graphics`"]
plotter[f_, overlayPoints_] :=
DisplayTogether[Plot[f@x, {x, 0, 10}], ReleaseHold@Graphics@{Red, \
PointSize[.03], If[overlayPoints, Table[Point@{x, f@x}, {x, 0,
10, .5}], HoldForm@Sequence[]]}]
plotter[#Sin[#] &, True]
plotter[#Sin[#] &, False]
or
plotter[f_, overlayPoints_] :=
DisplayTogether[Plot[f@x, {x, 0, 10}], ReleaseHold@If[
overlayPoints, Graphics@{Red, PointSize[.03], Table[Point@{x, f@x}, {x, 0,
10, .5}]}, HoldForm@Sequence[]]]
plotter[#Sin[#] &, True]
plotter[#Sin[#] &, False]
Bobby
On Tue, 2 Nov 2004 02:05:27 -0500 (EST), AES/newspost <siegman at stanford.edu> 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
>
>
>
>
--
DrBob at bigfoot.com
www.eclecticdreams.net
- References:
- Null entry in a Graphics list?
- From: AES/newspost <siegman@stanford.edu>
- Null entry in a Graphics list?