USGS-R / gsplot

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

layout funkyness #429

Closed ldecicco-USGS closed 7 years ago

ldecicco-USGS commented 7 years ago
g1 <- gsplot(xpd=FALSE) %>% 
  lines(1:9, seq(1,3, by=0.25), 
        legend.name="second line") %>% 
  axis(side=2, at=1:10)
g1
layout(matrix(1:2, 1, 2))
g1
g1

(this works as expected with PR#431). With the current master: image

and

gs1 <- gsplot() %>% 
  points(1:3, c(1,10,100)) %>% 
  points(3:5, c(10,100,1000), col="blue", side=4, log='y') %>% 
  axis(side=4) %>%
  grid() %>%
  grid(side=c(3,4), col="green")
gs1

gs2 <- 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) %>%
  grid() %>%
  grid(side=c(3,4), col="green")
gs2

layout(matrix(1:2, 1, 2))
gs1
gs2

With current master branch: image

(again, I think #431 fixes both of these....) with the pr:

image

lindsayplatt commented 7 years ago

Could you add examples of what the plots produced look like? Would be good to have that for future us.

lindsayplatt commented 7 years ago

This also might be related to #404

ldecicco-USGS commented 7 years ago

so in a nutshell, I wrote this Issue and submitted a PR not too long later to fix it. More importantly, I added the offending graph to the Readme, so we should be doubly sure to see if we break it next time (I'm befuddled on how/what to test in a unit test with layout, but we will now see diff's of the readme figure). It was in the vignette, but github doesn't show a nice diff on those html files like it does with the plain ol' pngs.