0

I have been working on generating a radial plot using the plotrix package in R. Things have been great, however the radial labels clump on top of one another. As the real data in this set is rather large I would prefer to not have any radial labels in the center of the plot.

Someone had already asked a question similar, however all of the solutions offered did not fix or get rid of this stack of labels Plotrix R package polar.plot symbol overwrite

Here is my code, and a test data frame to reproduce the error.

library(plotrix)

#Color function
colfunc <- colorRampPalette(c("red", "yellow", "blue", "black"))

testDF<-data.frame(Yr1898 = 1:10, 
  Yr1899 = 10:1, Yr1900= 1:10,
  Yr1901 = 10:1, Yr1902 = 1:10,
  Yr1903 = 10:1)


radial.plot(testDF, 
  rp.type = "l", 
  radial.pos = c(seq(0,8*pi/5,length.out=5), 0),
  labels = c("1903, 1898", 1899:1902),
  clockwise = TRUE,
  main="clumped labels in the center",
  line.col=colfunc(10),
)

I would post an image, but my reputation is too low. My apologies.

Community
  • 1
  • 1
Parulidae
  • 11
  • 1

2 Answers2

1

I think I figured out the issue. The most recent update of the radial.plot function in plotrix 3.5-3 does not contain code to do anything with radial.labels, show.grid.labels, etc. I downloaded a previous version 3.5-2 and everything worked.

Parulidae
  • 11
  • 1
0

I had a similar problem, I was trying to overlay a polar plot on an OpenStreetMap. I can confirm that this bug with radial labels exists with 32-bit R, but not 64-bit R (version 2.15.3).

madroan
  • 183
  • 1
  • 7