Skip to content
Prev 388610 / 398502 Next

Sin curve question

plot(sin, to=pi) # also works but with x labeled in radians.


# With x axis labeled in degrees
plot(sin, to=pi, axes=FALSE)
axis(2)
lbls <- seq(0, 180, 30)
axis(1, pi*lbls/180, lbls)


	  This can probably be done in ggplot2, but I don't know how off the 
top of my head.


	  Hope this helps.
	  Spencer
On 7/24/21 2:04 PM, Eric Berger wrote: