Re: Preventing plotting on output
- To: mathgroup at smc.vnet.net
- Subject: [mg20125] Re: [mg20090] Preventing plotting on output
- From: BobHanlon at aol.com
- Date: Sat, 2 Oct 1999 03:04:53 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Adam, First, in Show you have to refer to the plots by the names that you assigned them. Second, use Evaluate. nodisp = DisplayFunction -> Identity; graph1 = Plot[Sin[2 Pi x], {x, 0, 2}, Evaluate[nodisp]] ; graph2 = Plot[Sin[4 Pi x], {x, 0, 2}, Evaluate[nodisp]]; Show[{graph1, graph2}, DisplayFunction -> $DisplayFunction]; Bob Hanlon In a message dated 9/30/1999 6:35:30 AM, adam.smith at hillsdale.edu writes: >I know I could find the answer to this if I looked hard enough through >the Help and/or Manual, but I am certain one of the experts out there >will have the solution immediately. > >I want to construct some plots and then display them combined on one >graph. The Plot[] for each individual plot is fairly lengthy and I was >hoping to save some space by replacing the "DisplayFunction->Identity" >with a single word like "nodisp". In the final Show[] I would then >turn the display back on with the >usual "DisplayFunction>$DisplayFunction" (maybe even equate it with a >single term like "disp"). > >Here is a simplified example of what I quickly tried without success > >nodisp = DisplayFunction -> Identity > >graph1 = Plot[Sin[2 Pi x],{x,0,2},nodisp] Error messages show up >graph2 = Plot[Sin[4 Pi x],{x,0,2},nodisp] > >Show[{plot1,plot2},DisplayFunction -> $DisplayFunction] > >I realize I could use SetOptions[] to temporarily turn off and turn on >display, but defining nodisp seems more natural and intuitive to me. >