Modifying Radius Labels in Polar Plot

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Modifying Radius Labels in Polar Plot

gciriani
I've read many posts about modifying the value of Polar labels, and it seems
that it is not possible. However, as I was checking the properties of the
plot, I found a description for xticklabel that seems to correspond with the
values displayed in my polar radius. My radius displays values calculated in
radians from 0 to 3. The get(gca) shows

Since I would like to label the radius with 180 instead of 3.14 I was
wondering if a command that resembles the following would do the trick.

I tried a couple of variations but there is no apparent change. Obviously I
will have to make other adjustments, but this would be a start.



-----
Giovanni Ciriani - Windows 10, Octave 4.2.1, configured for x86_64-w64-mingw32
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Giovanni Ciriani - Windows 10, Octave 4.2.1, configured for x86_64-w64-mingw32
Reply | Threaded
Open this post in threaded view
|

Re: Modifying Radius Labels in Polar Plot

gciriani
This post was updated on .
Uhm, I just realized that the code I had tried to embed in my post before was
not showing. Here we go again. I have a polar graph showing radius labels
from 0-3, which I would like to change into 0-90. Inspecting the gca
parameters with the get(gca) command, shows (among many others) the
following
yticklabel =    {
      [1,1] = -3
      [1,2] = -2
      [1,3] = -1
      [1,4] = 0
      [1,5] = 1
      [1,6] = 2
      [1,7] = 3    }
So I was wondering if by manually modifying the parameter xticklabel would
do the trick. I typed the following commands
set(gca,'yticklabelmode','manual')
set(gca,'yticklabel',{'-3' '-2' '-1' '0' '1' '2' '90'})
just to see if one label would change, but nothing changes. What am I doing
wrong? Is it possible to manually change a polar graph label at all?



-----
Giovanni Ciriani - Windows 10, Octave 4.2.1, configured for x86_64-w64-mingw32
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Giovanni Ciriani - Windows 10, Octave 4.2.1, configured for x86_64-w64-mingw32
Reply | Threaded
Open this post in threaded view
|

Re: Modifying Radius Labels in Polar Plot

gciriani
By trial and error I determined that I can change the tickmarks for the
radius but I can't change their labels.
Example:
polar(linspace(0,2*pi),linspace(0,100));%plots a spiral with the outermost
point at radius 100.
set(gca,'rtick',[5 20]);%shows only the first 21 points in the spiral, and
outermost radius is 20.
However, the labels for the rticks are calculated directly from the rtick
values, and there is no way to adjust them differently. My guess is that the
other parameters that can be set, such as xtick and ytick are only used to
calculate the coordinates of the polar graph, but are not used to set the
labels.



-----
Giovanni Ciriani - Windows 10, Octave 4.2.1, configured for x86_64-w64-mingw32
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Giovanni Ciriani - Windows 10, Octave 4.2.1, configured for x86_64-w64-mingw32