COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Changing The Polar Axis Values

• Follow

```Hello,
I am plotting a polar chart of the edge of a pipe. I am plotting out the deformation from the pipe's original location. On the chart there are different shaped rings showing different deformation at different times during the test.

Is there a way to make the center of the polar chart be negative? I want to show how the pipe shifted from its zero position and the number of millimeters it moved from that zero location.

Any help would he appreciated
```
 0

```"Nicholas " <andreanc@mcmaster.ca> wrote in message <i0g4jb\$786\$1@fred.mathworks.com>...

> I am plotting a polar chart of the edge of a pipe. I am plotting out the deformation from the pipe's original location. On the chart there are different shaped rings showing different deformation at different times during the test.

> Is there a way to make the center of the polar chart be negative? I want to show how the pipe shifted from its zero position and the number of millimeters it moved from that zero location.

You can change the labels on the rings (I detailed the method in some earlier posts -- it isn't _hard_ but it isn't trivial).

On the other hand, it makes no sense for a polar plot to start from a negative radius. Consider where the origin (0) would have to be on such a plot: since the origin has no associated angle, the origin would have to be smeared over the entire ring of radius labeled 0.
```
 0

```"Walter Roberson" <roberson@ibd.nrc-cnrc.gc.ca> wrote in message <i0jsgu\$3ma\$1@fred.mathworks.com>...
> "Nicholas " <andreanc@mcmaster.ca> wrote in message <i0g4jb\$786\$1@fred.mathworks.com>...
>
> > I am plotting a polar chart of the edge of a pipe. I am plotting out the deformation from the pipe's original location. On the chart there are different shaped rings showing different deformation at different times during the test.
>
> > Is there a way to make the center of the polar chart be negative? I want to show how the pipe shifted from its zero position and the number of millimeters it moved from that zero location.
>
> You can change the labels on the rings (I detailed the method in some earlier posts -- it isn't _hard_ but it isn't trivial).
>
> On the other hand, it makes no sense for a polar plot to start from a negative radius. Consider where the origin (0) would have to be on such a plot: since the origin has no associated angle, the origin would have to be smeared over the entire ring of radius labeled 0.

Thanks Walter Robertson for your help. I am reading through the page where you described how to change the labels. It will take me some time to figure it out.

I know that a standard polar graph would not make sense in this situation, but leaving this as a standard polar graph in this situation would be confusing.

I have a pipe of 1.5m in diameter and I am looking at a deformation of 1mm. I took the values and subtracted off .995% of the whole pipe. Now I have a graph ranging from 0 to 4mm in radius. 0 has no relation to the radius of the pipe other than it is 3.5mm less than the average radii. All values are in mm.

This isn't matlab code, but it may help describe things.

%to find the range of values I want to use

%the original radius of the pipe

The edge of the original pipe is now at the value of 3.5. Now, if the pipe edge moves in by one mm from the original pipe radius, it lands in the range of 2.5. If the pipe edge moves out by 1mm, it lands in the range of 4.5.

The original values are confusing to describe and the zero radius value of that chart does not relate to the pipe radius. I would like the original radius of the pipe to be a ring on the graph with a value of 0 so I can say that the radius is deformation in mm. When the ring moves inwards by 1mm, I want there to be a ring inwards at -1. Outwards by 1mm, I want a 1.  If the center of the graph is -3, so be it; the center of the polar graph is unimportant. Only the deformation from the original pipe radius is critical.
```
 0

```"Walter Roberson" <roberson@ibd.nrc-cnrc.gc.ca> wrote in message <i0jsgu\$3ma\$1@fred.mathworks.com>...
> "Nicholas " <andreanc@mcmaster.ca> wrote in message <i0g4jb\$786\$1@fred.mathworks.com>...
>
> > I am plotting a polar chart of the edge of a pipe. I am plotting out the deformation from the pipe's original location. On the chart there are different shaped rings showing different deformation at different times during the test.
>
> > Is there a way to make the center of the polar chart be negative? I want to show how the pipe shifted from its zero position and the number of millimeters it moved from that zero location.
>
> You can change the labels on the rings (I detailed the method in some earlier posts -- it isn't _hard_ but it isn't trivial).
>
> On the other hand, it makes no sense for a polar plot to start from a negative radius. Consider where the origin (0) would have to be on such a plot: since the origin has no associated angle, the origin would have to be smeared over the entire ring of radius labeled 0.

I can't find the thread regarding Walter's method on relabling the rings.  Can you please post a link?  I'd also like to rename the radial bearings, to have 0 plot at the top to reference azimuth (north equals 0 degrees).
```
 0

```To change the values in a polar diagram is annoying. Each number in a polar diagram is stored in an array. However, the length of that array changes according to the input data.

I will write the code later on. First the concept.

Suppose you have an array with 4 rings to indicate radius. The array will have value 20, 21, 22 and 23 be the numbers on the four rings. Now, if the array increases in size, then the number of rings would increase to 5 and your code doesn't work anymore. Also, if the array increases its diameter to a magnitude larger and you still have 4 rings, you can't tell what values you are dealing with unless you setup a whole set of possible solutions.

Anyway, I did that all a long time ago and I remember how I did it, but I don't know everything on it. This is the code I used. A, B, C and D are strings

D = '-4.0';
C = '-2.0';
B = '0.0';
A = '2.0mm';

%extracting the array findall
ph=findall(gca,'type','text');
ps=get(ph,'string');
ps(20:23)={''};
% Inputing the data into the matrix
ps([20,21,22,23])={A;B;C;D};
%Giving values to the rest of the terms in the array
set(ph,{'string'},ps);
ps=get(ph,'fontweight');
ps(1:3)={'bold'};
set(ph,{'fontweight'},ps);
ps=get(ph,'position');
ps{1}(1)=-8;
set(ph,{'position'},ps);
hold off

Hmmm... I cant find where I processes the code from this point onward. I do believe that that plots it somehow.... There is a Hold Off at  the end so this is being modified to the plot while the plot is still active. Anyway, this should help you get started on how to change the angles on your plot
```
 0
Reply andreanc (1) 2/14/2011 3:05:04 PM

4 Replies
962 Views

Similiar Articles:

7/22/2012 4:39:57 AM