zeileis · GitHub

As discussed in #182 I have tried to implement character specifications of different axis types. The docs of the relevant arguments in tinyplot.default now say:

library("tinyplot")
x <- 0:100/10
y <- sin(x)
tinyplot(y ~ x, type = "l", lwd = 2, col = "steelblue", grid = TRUE, main = 'default')
tinyplot(y ~ x, type = "l", lwd = 2, col = "steelblue", grid = TRUE, main = 'axes = "ticks"', axes = "ticks")
tinyplot(y ~ x, type = "l", lwd = 2, col = "steelblue", grid = TRUE, main = 'axes = "labels"', axes = "labels")
tinyplot(y ~ x, type = "l", lwd = 2, col = "steelblue", grid = TRUE, main = 'axes = "axis"', axes = "axis")
tinyplot(y ~ x, type = "l", lwd = 2, col = "steelblue", grid = TRUE, main = 'xaxt = "ticks", yaxt = "labels"', xaxt = "ticks", yaxt = "labels")
tinyplot(y ~ x, type = "l", lwd = 2, col = "steelblue", grid = TRUE, main = 'axes = "none", yaxt = "standard"', axes = "none", yaxt = "standard")

Note that the plot in the bottom left panel is maybe unexpected. The reason is that frame.plot is solely selected based on axes (which is TRUE here) and not based on xaxt/yaxt. One could consider changing that but I felt that the selection of the defaults is already involved enough for a first proposal.

Feel free to make any changes or discard the PR if it's not useful (in this way).

Read the original on github.com ↗