Re: Supressing the output of Plot
- To: mathgroup at smc.vnet.net
- Subject: [mg30609] Re: Supressing the output of Plot
- From: Adam Smith<adam.smith at hillsdale.edu>
- Date: Fri, 31 Aug 2001 04:09:34 -0400 (EDT)
- References: <9mkt0v$1un$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
It appears that using PlotLegend somehow overrides the Display->Identity. Maybe
some of the Mathematica gurus know a way around this. But I did stumble upon a
way that is probably not the most elegant method. Using graphics primitive
places something resembling a legend without displaying the plot.
It will need some work in your case, but might at least be a starting point.
and in your case the exact placement of text will need some work.
In[1]:=
graphthing =
{Plot[{Sin[t], Cos[t]}, {t, 0, 5}, PlotRange -> {{0, 5}, {-2, 2}},
PlotStyle\[Rule]{GrayLevel[0],Dashing[{.03}]},
DisplayFunction -> Identity ],
Graphics[{Line[{{3,2},{4,2}}],Text["Uno",{4.5,2}]}],
Graphics[{Dashing[{0.03}],Line[{{3,1},{4,1}}],Text["Dos",{4.5,1}]}]};
In[2]:=
Show[graphthing,DisplayFunction->$DisplayFunction]
In article <9mkt0v$1un$1 at smc.vnet.net>, Frank Black says...
>
>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
>
Adam Smith
Dept. of Physics
Hillsdale College
adam.smith at hillsdale.edu