Re: Flipping axes on Graphics
- To: mathgroup at smc.vnet.net
- Subject: [mg97418] Re: [mg97391] Flipping axes on Graphics
- From: "David Park" <djmpark at comcast.net>
- Date: Fri, 13 Mar 2009 04:46:50 -0500 (EST)
- References: <8364954.1236843416479.JavaMail.root@m02>
Again, I use the Presentations package so I can use the CustomTicks routine to easily obtain major and minor ticks. We use the Mathematica Rescale function to do the actual flipping. Needs["Presentations`Master`"] yticks = CustomTicks[Rescale[#, {-1, 1}, {1, -1}] &, {-1., 1., .5, 5}]; Draw2D[ {Draw[Rescale[Sin[x], {-1, 1}, {1, -1}], {x, 0, 2 \[Pi]}]}, AspectRatio -> 1/GoldenRatio, Axes -> True, Ticks -> {Automatic, yticks}] David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ From: sidney at jigsaw.nl [mailto:sidney at jigsaw.nl] Dear all, I am looking for a way to flip the direction of an axis that is used to render a Graphics object. For example, I would like to be able to do Plot[Sin[x], {x, 0, 2*Pi}] but the top-left corner of the rendered Graphics object would correspond to coordinate (0,-1) while the bottom-left corner would correspond to (0, +1); effectively, the graph would need to be mirrored in the x-axis. I've skimmed all Graphics options and it seems the convention that increasing x is rendered left-to-right and increasing y is rendered bottom-to-top is hard-wired into Graphics. Would there be a clever way to get around this? Best regards, Sidney