Thread Subject: Wrap by plot by 90?

Subject: Wrap by plot by 90?

From: Joh Yhan

Date: 1 Jul, 2008 06:08:03

Message: 1 of 8

Hi,

How do we change this plot whose X-axis is [-90, 180, 90] to
[180, -90, 90]?

Thank you in advance.

Regards,

Joh

Subject: Wrap by plot by 90?

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 1 Jul, 2008 09:59:54

Message: 2 of 8

In article <g4chk3$n2h$1@fred.mathworks.com>, Joh Yhan <johyhan@aim.com> wrote:

>How do we change this plot whose X-axis is [-90, 180, 90] to
>[180, -90, 90]?

What is [-90, 180, 90] intended to mean? That the X value starts
at -90, increases through the negative values, passing 0, upwards
in positive values to 180, and then decreases again in positive
values to 90? With 90 to 180 thus appearing once in increasing
order and then the -same- values occuring again in reverse order?
--
   "No one has the right to destroy another person's belief by
   demanding empirical evidence." -- Ann Landers

Subject: Wrap by plot by 90?

From: Joh Yhan

Date: 1 Jul, 2008 11:20:20

Message: 3 of 8

Hi Walter,

X-axis1: [-90, 180, 90]
X-axis2: [180, -90, 90]

X-axis1 and X-axis2 are angular values in degrees.

Yes, X-axis1 increases from -90 to 180, and then decreases
from there to 90. The opposite goes for X-axis2.

Thank you.

Joh

 


roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <g4cv6q$m8a$1@canopus.cc.umanitoba.ca>...
> In article <g4chk3$n2h$1@fred.mathworks.com>, Joh Yhan
<johyhan@aim.com> wrote:
>
> >How do we change this plot whose X-axis is [-90, 180, 90] to
> >[180, -90, 90]?
>
> What is [-90, 180, 90] intended to mean? That the X value
starts
> at -90, increases through the negative values, passing 0,
upwards
> in positive values to 180, and then decreases again in
positive
> values to 90? With 90 to 180 thus appearing once in increasing
> order and then the -same- values occuring again in reverse
order?
> --
> "No one has the right to destroy another person's belief by
> demanding empirical evidence." -- Ann
Landers

Subject: Wrap by plot by 90?

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 1 Jul, 2008 17:40:55

Message: 4 of 8

In article <g4d3tk$ptj$1@fred.mathworks.com>, Joh Yhan <johyhan@aim.com> wrote:

>X-axis1: [-90, 180, 90]
>X-axis2: [180, -90, 90]

>X-axis1 and X-axis2 are angular values in degrees.

>Yes, X-axis1 increases from -90 to 180, and then decreases
>from there to 90. The opposite goes for X-axis2.

And to confirm, the data from 180 down to 90 is a reversed
duplicate of the data from 90 to 180? If so, then should we
also deduce that in the revised plot, that you wish to
go from 180 down through 0 to -90 and then climb back to 90
and that the data in the second occurance of -90 to 90 should
be a reversed duplicate of the the 90 to -90?

What exactly are you starting with? An x vector that
internally runs from -90 to 180 up to 270, but you then use
the Xlabel axis property to relabel the 180 to 270 to be 180 to 90 ??

Is the current data for the 180 to 90 part just a duplicate,
or is it slightly different? For example, if your x vector
incremented in (say) 7 degree increments, then in the upward sweep,
the last X would be at 176; the next would be virtual 183 which
in the reversed labelling would be 177 -- so in this situation
the upwards X values would not exactly match the X values for the
downturn, and thus we would be discarding information if we
just treated the downturn as a duplicated reverse of the upturn --
and that in turn would mean that since the coverage of
[180, -90, 90] does not exactly match the coverage of [-90, 180, 90]
(different parts overlap), that we would have to -interpolate-
the values for the overlap rather than just duplicate them.


I am having difficulty imagining *why* you would want to
have overlapping angular regions in your plot, which makes it
difficult to know whether to just give you a relatively
trivial answer or something more complex. I checked your back
postings, and you are -not- the person who recently asked
about hysteresis (which was the only physically significant
reason I could think of for wanting to duplicate ranges.)
--
  "Allegories are in the realm of thoughts, what ruins are in
  the realm of things." -- Walter Benjamin

Subject: Wrap by plot by 90?

From: Joh Yhan

Date: 3 Jul, 2008 01:16:03

Message: 5 of 8

Thank you Walter for sorting out.

I apologize for the confusion to anyone affected. I
answered quickly in my last reply. I also got confused by
the 2*pi ambiguity of circular data. So,********to
EVERYONE, part of my original post and last reply is
misleading********.

Okay, X-axis1 represents a spatial data that covers -90 to
180 deg and continues to 90 deg, i.e.

X-axis1: [-90 -120 -150 -179 179 150 120 90].

So X-axis1 is decreasing from -90 to -179 and also from 179
to 90. Using the simple MATLAB plot, X-axis1 becomes

X-axisM: [-179 -150 -120 -90 90 120 150 179].

With X-axisM, the resulting plot would be empty from -91,
-70, 0, 70, and 89 deg (empty zone).

So, clearing up, how do we come up with X-axis1 above
instead of X-axisM? Another way to say that is, how do we
avoid the empty zone (not [-90 0 90] but [-90 180 90])?

Thank you again,

Joh

Subject: Wrap by plot by 90?

From: Joh Yhan

Date: 3 Jul, 2008 01:32:01

Message: 6 of 8

To avoid the confusion, let me repeat, edit, and rephrase,
my previous reply.

How do we come up with X-axis1 instead of X-axisM?
How do we avoid the empty zone (-90 0 90 deg) and instead
use (-90 180 90 deg)?

Subject: Wrap by plot by 90?

From: Ci Xang

Date: 4 Jul, 2008 02:46:03

Message: 7 of 8

Try to use the 360-deg scale (270 180 90) for (-90 -180 90)
instead of the plus/minus 180-deg scale. Just add 360 to
(-90 -180 90) and then set(gca, 'XDir', 'reverse'). Matlab
would not allow non-monotonically increasing axis values for
the case of the (-90 180 90 deg) scale. I wish it could and
thus would allow more of us to customize the axes (hint for
next R200x version)!

Smile,

Ci

Subject: Wrap by plot by 90?

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 4 Jul, 2008 15:53:31

Message: 8 of 8

In article <g4k2tb$da1$1@fred.mathworks.com>, Ci Xang <c.xmg@gmx.com> wrote:
>Try to use the 360-deg scale (270 180 90) for (-90 -180 90)
>instead of the plus/minus 180-deg scale. Just add 360 to
>(-90 -180 90) and then set(gca, 'XDir', 'reverse'). Matlab
>would not allow non-monotonically increasing axis values for
>the case of the (-90 180 90 deg) scale. I wish it could and
>thus would allow more of us to customize the axes (hint for
>next R200x version)!

Axes can, however, be relabelled arbitrarily by setting the
XTick, YTick, or ZTick properties to the locations you want the
labels to appear (locations in terms of the data coordinates you
handed to the plotting routines), and setting the XLabel, YLabel,
or ZLabel properties to the strings you want those labels to show up as
on the graph.
--
  "The first draught serveth for health, the second for pleasure,
  the third for shame, the fourth for madness." -- Sir Walter Raleigh

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
plus minus 180d... Ci Xang 3 Jul, 2008 22:50:08
360deg scale Ci Xang 3 Jul, 2008 22:50:08
90 180 90 not 9... Joh Yhan 2 Jul, 2008 21:35:06
not 90 0 90 but... Joh Yhan 2 Jul, 2008 21:20:09
pi2 axis shift Joh Yhan 1 Jul, 2008 07:25:11
pi2 axis wrap Joh Yhan 1 Jul, 2008 07:25:11
wrap plot by 90 Joh Yhan 1 Jul, 2008 07:25:11
rssFeed for this Thread

Contact us at files@mathworks.com