       RE: Supressing the output of Plot

• To: mathgroup at smc.vnet.net
• Subject: [mg30615] RE: [mg30596] Supressing the output of Plot
• From: "David Park" <djmp at earthlink.net>
• Date: Fri, 31 Aug 2001 04:09:40 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Frank,

Here is one method that I think will work.

Needs["Graphics`Legend`"]

Define the following DontShow routine.

Attributes[DontShow] = {HoldAll};
DontShow[args___] :=
Block[{\$DisplayFunction = Identity},
Show[args]]

Now, wrap it around your individual plots.

p1 =
DontShow[Plot[{Sin[t], Cos[t]}, {t, 0, 5}, DisplayFunction -> Identity,
PlotLegend -> {"Uno", "Dos"}, LegendPosition -> {.3, -.6},
PlotRange -> {{0, 5}, {-2, 2}}]];

Show[p1];

Show[GraphicsArray[{p1, p1}]]

David Park

> From: Frank Black [mailto:fblack2 at mail.com]
To: mathgroup at smc.vnet.net
>
> I'm making a Table full of Plots using Table[Plot[...]],  and would
> like to suppress the display of the resulting plots until later, when
> I will use GraphicsArray.
>
> Setting DisplayFunction -> Identity in the Plot command works until I
> include a legend with PlotLegend, then every single plot will be
> displayed.
>
> Example of no plot output:
>   Plot[{Sin[t], Cos[t]}, {t, 0, 5}, DisplayFunction -> Identity,
>        PlotRange -> {{0, 5}, {-2, 2}}];
>
> Example of undesired plot outputs:
>   Plot[{Sin[t], Cos[t]}, {t, 0, 5}, DisplayFunction -> Identity,
>       PlotLegend -> {"Uno", "Dos"}, LegendPosition -> {.3, -.6},
>       PlotRange -> {{0, 5}, {-2, 2}}];
>
> Any suggestions?
>
> Thanks,
> Frank
>

```

• Prev by Date: Re: Supressing the output of Plot
• Next by Date: Re: Supressing the output of Plot
• Previous by thread: Re: Supressing the output of Plot
• Next by thread: Re: Supressing the output of Plot