How to do clock-wise increasing polar plot in matlab?
27 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sivakandan Mani
el 8 de Oct. de 2015
Respondida: Abby Skofield
el 4 de Oct. de 2024
Dear all,
I want to draw polar plot with angle of increment is in clockwise direction. while doing polar plot in matlab the angle of increment will coming in anti-clockwise direction (by default). Now, I want to get it in opposite direction. So, anyone can help me? Note: I am using matlab 2012b. thank you, With best regards,
Sivakandan M
2 comentarios
dpb
el 8 de Oct. de 2015
With great difficulty unless--*polar* is actually an ordinary cartesian axes with the transformation of coordinates from the input r,theta to x,y for plotting.
The radial spokes of the axes you see are thus just additional lines, not actually any real objects related to the polar coordinate axes they represent at all. And, the angle labels are text objects drawn at the [x*cos(t),y*sin(t)] coordinates in x,y space of the (invisible) axes on which it is all drawn as well.
Unfortunately, unless they've done it finally in the new HG2 release, TMW has never built any actual objects of any sort for handling polar, cylindrical or shperical coordinate systems. You've got to do it all from scratch if it isn't in the provided routines (which are pretty rudimentary, granted).
You might search File Exchange and see if anybody has provided enhanced versions.
Walter Roberson
el 8 de Oct. de 2015
In the earlier releases you can find the text objects and change them. Do you need the data tips switched over too?
Respuesta aceptada
Kelly Kearney
el 8 de Oct. de 2015
Editada: Kelly Kearney
el 8 de Oct. de 2015
a = linspace(0, 2*pi);
r = exp(a)-1;
mmpolar(a, r, 'TDirection', 'cw')
0 comentarios
Más respuestas (1)
Abby Skofield
el 4 de Oct. de 2024
Starting in R2016a, the polaraxes command can create a real PolarAxes object with properties and several functions you can use to customize its appearance, like the direction. For instance, you can use polaraxes and polarplot (also introduced in R2016a) to plot some data and then customize the direction and labeling of the polar axes.
a = linspace(0, pi);
r = exp(a)-1;
pax = polaraxes;
p = polarplot(a,r);
pax.ThetaDir = "clockwise";
pax.ThetaZeroLocation = "top";
pax.ThetaAxisUnits = "radians";
Additional plotting functions have been added in subsequent releases: https://www.mathworks.com/help/matlab/creating_plots/plotting-in-polar-coordinates.html
0 comentarios
Ver también
Categorías
Más información sobre Polar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!