USGS-R / gsplot

plotting foundation for timeseries reporting
Other
6 stars 14 forks source link

Axis log wrong side --- FIX #424

Closed lindsayplatt closed 7 years ago

lindsayplatt commented 7 years ago

Fixing #414

Test out:

# side 4 logged, side 2 not logged
gs <- gsplot() %>% 
  points(1:3, c(1,10,100)) %>% 
  points(3:5, c(10,100,1000), col="blue", side=4, log='y') %>% 
  axis(side=4)
gs

# side 3 logged, side 1 not logged
gs <- gsplot() %>% 
  points(c(1,10,100), 1:3, side=1) %>% 
  points(c(10,100,1000), 3:5, col="blue", side=3, log='x') %>% 
  axis(side=3)
gs

# side 3 logged, side 1 not logged
gs <- gsplot() %>% 
    points(c(1,10,100), 1:3, side=1) %>% 
    points(c(10,100,1000), 3:5, col="blue", side=3) %>% 
    axis(side=3) %>% 
    view(side=3, log='x')
gs

# side 1 logged, side 3 not logged
gs <- gsplot() %>% 
    points(c(1,10,100), 1:3, side=1) %>% 
    points(c(10,100,1000), 3:5, col="blue", side=3) %>% 
    axis(side=3) %>% 
    view(side=1, log='x')
gs
lindsayplatt commented 7 years ago

That last example where we are trying to log side=1 but not side=3 is still wrong. I think it is something with the par setting in the print loop that iterates over each side.

gs <- gsplot() %>% 
    points(c(1,10,100), 1:3, side=1, log='x') %>% 
    points(c(10,100,1000), 3:5, col="blue", side=3) %>% 
    axis(side=3)
gs
lindsayplatt commented 7 years ago

par culprits for losing labels: mfrow & mfg. When these two were reset together, the labels disappeared. One reset and the other not, did not result in disappearing labels.

We don't really know why....:crystal_ball:

ldecicco-USGS commented 7 years ago

Funky