RE: Reverse the vertical axis
- To: mathgroup at smc.vnet.net
- Subject: [mg29254] RE: Reverse the vertical axis
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 8 Jun 2001 04:15:38 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Here is a sample function for a coutour plot. f[x_, y_] := y^2*Sin[x] This is the regular contour plot with y increasing in the upward direction. ContourPlot[f[x, y], {x, 0, Pi}, {y, 0, 1}, ColorFunction -> Hue, FrameLabel -> {x, y}]; This is the same function plotted with y increasing in the downward direction. We had to change the sign of y in the function and the domain, and we had to use the FrameTicks option to relabel the y axis. ContourPlot[f[x, -y], {x, 0, Pi}, {y, -1, 0}, ColorFunction -> Hue, FrameLabel -> {x, y}, FrameTicks -> {Automatic, Table[{y, -y}, {y, 0, -1, -0.2}], Automatic, Automatic}]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ > From: goyteck at hotmail.com [mailto:goyteck at hotmail.com] To: mathgroup at smc.vnet.net > > > Dear all, > > I would like to know if there is a way to present the y-axis of a > contour plot to increase vertically downward, instead of vertically > upward as it usually does. That mean that I wish to have the plot of > the following form > > > ----------------> x > | > | > | > | > | > \ / > y > > > Thank you for helping. Have a nice day. > > > Goy Teck Lim >