Polar plot coordinates are wrong

Andres Firman

I want to draw a simple polar plot of cos(ang) in R using polar.plot, but the result is a plot with center in (-1) and the resultant plot don't have any sense. For example is not 0 in 90°. How can I solve this problem?

library(plotrix)
grados=seq(0,350,by=10)
radian=grados*pi/180
coseno=cos(radian)  
polar.plot(coseno,grados,rp.type="p")
Marc in the box

I'm not sure that I completely understand your problem, but you should have a look at the help for radial.plot, which explains a lot of the arguments used in polar.plot. In the example below, I add three arguments that may help you set up your plot definitions (start,radial.lim, and clockwise)

polar.plot(coseno,grados, rp.type="p", start=90, radial.lim=c(-1,1.5), clockwise=TRUE)

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Related Related

HotTag

Archive