[Date Index]
[Thread Index]
[Author Index]
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 email from the reborn 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 2D 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 yaxes 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 < xaxis calibration values.


\_ in this column are the yaxis 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 yaxis 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 lefthand 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 < xaxis calibration values. CORRECT


\_ in this column are the yaxis 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 lefthand corner ?
Thanks for your attention,
Simon
====================================
Dr Simon Chandler
HewlettPackard 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
==================================
Prev by Date:
Library of Signal processing routines
Next by Date:
extending mathematica's functionality
Previous by thread:
Re: plots in reverse order
Next by thread:
[no subject]
 