Skip to content

Commit

Permalink
Update newaxis.R
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Aug 8, 2023
1 parent fc74a44 commit 0c53b30
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions misc/label-placement/newaxis.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ s <- c('inks' , 'pardee', 'clarksville', 'palau', 'hao', 'inks', 'eheuiki', 'pua
x <- fetchOSD(s)

dev.off()
options(.aqp.plotSPC.args = NULL)

## aqp 1.x compatibility
par(mar = c(0, 0, 0, 2))
Expand All @@ -19,17 +20,17 @@ plotSPC(osd, axis.line.offset = 0)

dev.off()

# stricter interpretation of max.depth
par(mar = c(0, 0, 0, 2))

data("jacobs2000")
data("osd")

plotSPC(jacobs2000)
plotSPC(jacobs2000, max.depth = 250)
plotSPC(jacobs2000, max.depth = 50)

options(.aqp.plotSPC.args = NULL)
plotSPC(x)

# compare axis style
par(mar = c(0, 0, 0, 1), mfcol = c(2, 1))
plotSPC(osd, depth.axis = list(style = 'compact'))
plotSPC(osd, depth.axis = list(style = 'traditional'))
Expand All @@ -41,6 +42,7 @@ plotSPC(x, depth.axis = list(style = 'traditional'))

dev.off()

# test bg / fg colors
par(bg = 'black', fg = 'white')
plotSPC(x)

Expand All @@ -50,9 +52,10 @@ plotSPC(x)
dev.off()


par(mar = c(0, 0, 0, 2))


# test .aqp.plotSPC.args
# test new depth.axis interface
par(mar = c(0, 0, 0, 2))

.args <- list(width = 0.3, name.style = 'center-center', cex.names = 1)
options(.aqp.plotSPC.args = .args)
Expand Down

0 comments on commit 0c53b30

Please sign in to comment.