plotting w/ flipped axes

From: David P. Huenemoerder <dph>
Date: Wed, 6 Nov 2002 15:16:53 -0500
I'm trying to plot f/i, (f+i)/r grids in temperature and density.
Both of these ratios decrease w/ increasing physical parameter
(density and temperature).  So I'd like to reverse the x- and
y-ranges.  But I get an error if I flip the xrange or x- and y-ranges.
If I only flip the y, I get a message, but the plot is drawn.

Here's an example:

% testing...

x = [0.2:1.4: 0.1];
y = sin(x);

xrange(0, 1.4);  % normal
yrange(0, 1.2);  % normal
plot(x, y);      % OK (of course)


xrange(1.4, 0);  % reversed
yrange(0, 1.2);  % normal
plot(x, y);      % fails
	*** No data in specified X limits
	*** Invalid:  plot Y limits
	*** plot failed


xrange(0, 1.4);  % normal
yrange(1.2, 0);  % reversed
plot(x, y);      % ok, but says: 
	*** No data in specified Y limits

xrange(1.4, 0);  % reversed
yrange(1.2, 0);  % reversed
plot(x, y);      % fails


% A hacky work-around, to get the graphic in the desired orientation:

xrange(-1.4, 0);  % negated
yrange(-1.2, 0);  % negated
plot(-x, -y);     % negated, OK


Thanks,
-- Dave

David Huenemoerder (617-253-4283; fax: 253-8084)
MIT Center for Space Research/Chandra X-ray Center
70 Vassar St., NE80-6023,
Cambridge, MA  02139
[Admin. Asst.: Deborah Gage 617-253-0228, dgage_at_email.domain.hidden----
You received this message because you are
subscribed to the isis-users list.
To unsubscribe, send a message to
isis-users-request_at_email.domain.hiddenwith the first line of the message as:
unsubscribe
Received on Wed Nov 06 2002 - 15:17:02 EST

This archive was generated by hypermail 2.3.0 : Fri May 02 2014 - 08:35:44 EDT