Re: plots in reverse order
- To: mathgroup at christensen.cybernetics.net
- Subject: Re: plots in reverse order
- From: Simon Chandler <simonc at hpcpbla.bri.hp.com>
- Date: Mon, 17 Oct 1994 13:09:28 +0100
17/10/94 In my first bit of incomiing e-mail from the re-born MathGroup (congratulations Steve, and hello again MathGroupies out there!) John Pender said: > on rare occasions I like to make plots for which the value of a point on the > x axis decreases as you go from left to right, as opposed to increases. > ... I haven't found an obvious solution I have a similar problem with 2-D plots of _data_, like ListContourPlot. If I try to use MeshRange with 'reversed' labelling of an axis then Mathematica 'automatically' switches around the arguments I gave the MeshRange option; very frustrating. My task was to produce a contour plot of a 2D matrix of data with the x and y-axes labeled with numbers rather than the array values. To do this one usually uses ListContourPlot with the MeshRange option. i.e., I want to produce a plot of... 100 1 2 3 4 5 200 3 4 6 7 9 300 4 7 8 6 5 ^ in this row are the | 10 20 30 40 50 <-- x-axis calibration values. | | \_ in this column are the y-axis calibration values. I used: ListContourPlot[ {{1,2,3,4,5},{3,4,6,7,9},{4,7,8,6,5}}, MeshRange->{{10,30},{300,100}} ] Note that the y-axis argument to MeshRange is {300,100}, with the first element larger than the second. This is because I wanted the origin to be in the top left-hand corner as indicated. However, this produces an identical contour plot to: ListContourPlot[ {{1,2,3,4,5},{3,4,6,7,9},{4,7,8,6,5}}, MeshRange->{{10,30},{100,300}} ] so you actually get 300 1 2 3 4 5 200 3 4 6 7 9 100 4 7 8 6 5 ^ in this row are the | 10 20 30 40 50 <-- x-axis calibration values. CORRECT | | \_ in this column are the y-axis calibration values. WRONG Effectively, MeshRange->{{10,50},{300,100}} becomes MeshRange->{{10,50},{100,300}} before it is used to label the contour plot. My questions are: * Why does MeshRange work in this way ? * Is it supposed to ? * How can I make my axis labels increase from the top left-hand corner ? Thanks for your attention, Simon -----=----==---=-=--====-=---===--=--=-==-===-==--==-=-=-======--=-==--= Dr Simon Chandler Hewlett-Packard Ltd Tel: 0272 228109 Computer Peripherals Bristol Fax: 0272 236091 Filton Road, Stoke Gifford Bristol, BS12 6QZ email: simonc at bri.hp.com United Kingdom ---==----=-=---====--=---=-==--===-=-=--=====-=----===---=--=--==-==-=-=