Re: programmatically rotating a function plot
- To: mathgroup at smc.vnet.net
- Subject: [mg99463] Re: programmatically rotating a function plot
- From: dh <dh at metrohm.com>
- Date: Wed, 6 May 2009 05:24:18 -0400 (EDT)
- References: <gtp1a9$jp8$1@smc.vnet.net>
Hi Rodney, the representation of Graphics seems to have changed. Your replacement rule ({x_, y_}:> {-y,x}) catches cases it is not intended for. Therefore make it more specific. I also change the PlotRange: ================================ pic1 = Plot[8 Sin[Pi t] Exp[-t], {t, 0, 4}]; plot4[p_] := Module[{R, p1, p2, p3}, R[q_] := q /. {x_?NumericQ, y_?NumericQ} :> {-y, x}; p1 = R[p]; p2 = R[p1]; p3 = R[p2]; Show[{p, p1, p2, p3}, PlotRange -> All] ]; plot4[pic1] ================================ Daniel Rodney wrote: > This (from some book) worked in Mathematica 4, but not now: > > - - - - - - - - - - - - > pic1 = Plot[8 Sin[Pi t] Exp[-t], {t, 0, 4}] > > plot4[p_] := Module[{R, p1, p2, p3}, > R[q_] := Show[q/.{x_, y_}:> {-y,x}]; > p1 = R[p]; p2 = R[p1]; p3 = R[p2]; > Show[p,p1,p2,p3] > ]; > > plot4[pic1] > > - - - - - - - - - - - - - > > I can't figure out how to do it today. Thanks for any suggestions. > >