Re: Listable
- To: mathgroup at smc.vnet.net
- Subject: [mg15146] Re: Listable
- From: BobHanlon at aol.com
- Date: Wed, 16 Dec 1998 03:11:20 -0500
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 12/13/98 2:55:22 PM, rommel at bc.edu writes: >I'd like to plot an GraphicsArray with a structure like > >Show[GraphicsArray[Plot[{{Sin[x],Cos[x]},{Tan[x],Cot[x]}},{x,0,3}]]] > >but when I make Plot listable > >SetAttributes[Plot,Listable] > >it mistakes the Range {x,0,3} as an argument. That I ca prevent by > >myPlot=Plot[#,{x,0,3}]&; > >SetAttributes[myPlot,Listable]; > >Show[GraphicsArray[myPlot[{{Sin[x],Cos[x]},{Tan[x],Cot[x]}}]]] > >but still I get just one plot. > >FullForm shows me a lsit of lines?! > >Any sugestion? > Martin, Study the differences between these statements and their outputs. Bob Hanlon _____________________________ Plot[{Sin[x], Cos[x], Tan[x], Cot[x]}, {x, 0, 3}]; Show[GraphicsArray[ Plot[#, {x, 0, 3}, DisplayFunction->Identity]& /@ {Sin[x], Cos[x], Tan[x], Cot[x]}], DisplayFunction -> $DisplayFunction]; Show[GraphicsArray[ Plot[#, {x, 0, 3}, DisplayFunction->Identity]& /@ {{Sin[x], Cos[x]}, {Tan[x], Cot[x]}}], DisplayFunction -> $DisplayFunction]; Show[GraphicsArray[ {Plot[#, {x, 0, 3}, DisplayFunction->Identity]& /@ {Sin[x], Cos[x]}, Plot[#, {x, 0, 3}, DisplayFunction->Identity]& /@ {Tan[x], Cot[x]}}], DisplayFunction -> $DisplayFunction]; Show[GraphicsArray[Partition[ Plot[#, {x, 0, 3}, DisplayFunction->Identity]& /@ {Sin[x], Cos[x], Tan[x], Cot[x]}, 2]], DisplayFunction -> $DisplayFunction];