Re: is there a way to swap the axes in a Plot?
- To: mathgroup at smc.vnet.net
- Subject: [mg29941] Re: [mg29910] is there a way to swap the axes in a Plot?
- From: Omega Consulting <omega_consulting at yahoo.com>
- Date: Thu, 19 Jul 2001 03:57:05 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
At 01:08 AM 7/18/2001, David E. Burmaster wrote: >Dear MathGroup, > >Is there an easy way to "transpose" the Plot of a graph? > >I know the inverse function in closed form (and it is impossible to invert >in closed form). > >In other words, I have an equation in closed form for: > > x = f^-1[y] > >I want to Plot this inverse function, then "transpose" the graph so that >the final graphic has x on the horizontal axis and y on the vertical axis. > >Any ideas? > >many thanks, >David E. Burmaster > >deb at Alceon.com It takes some understanding of graphics primitives, but once you do it's pretty simple. Just reverse each point in the line. f=Plot[5 x^2,{x,0,1}] Show[f/.Line[pts_]:>Line[Map[Reverse,pts]]]