MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Supressing the output of Plot


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


  • Prev by Date: Re: Simultaneous difference equation
  • Next by Date: Re: Delete All Output (bug)
  • Previous by thread: Re: Supressing the output of Plot
  • Next by thread: file association