At the moment some single-letter plot types, notably type = "h", do not cooperate with flip = TRUE. Try:
tinyplot(1:10, (1:10)^2, type = "h", flip = FALSE)
tinyplot(1:10, (1:10)^2, type = "h", flip = TRUE)
With flip = TRUE I would have expected the plot on the right, but I got the plot in the middle. The reason is that only the axes are flipped and type = "h" still draws vertical bars rather than horizontal bars. To obtain the desired output I had to use:
tinyplot(xmin = 0, ymin = 1:10, xmax = (1:10)^2, ymax = 1:10, type = "segments")
A similar issue exists with type = "s" and "S", respectively. However, it is somewhat easier to work around this because when flip = TRUE one can simply switch to type = "S" and "s", respectively.
tinyplot(1:10, (1:10)^2, type = "s", flip = FALSE)
tinyplot(1:10, (1:10)^2, type = "s", flip = TRUE)
tinyplot(1:10, (1:10)^2, type = "S", flip = TRUE)
(If we wanted to mimic this behavior, we could implement a type = "H" for vertical histogram lines.)
At the moment some single-letter plot
types, notablytype = "h", do not cooperate withflip = TRUE. Try:With
flip = TRUEI would have expected the plot on the right, but I got the plot in the middle. The reason is that only the axes are flipped andtype = "h"still draws vertical bars rather than horizontal bars. To obtain the desired output I had to use:A similar issue exists with
type = "s"and"S", respectively. However, it is somewhat easier to work around this because whenflip = TRUEone can simply switch totype = "S"and"s", respectively.(If we wanted to mimic this behavior, we could implement a
type = "H"for vertical histogram lines.)