joshuaulrich / xts

Extensible time series class that provides uniform handling of many R time series classes by extending zoo.
http://joshuaulrich.github.io/xts/
GNU General Public License v2.0
219 stars 71 forks source link

plot.xts ignores col when type = "h" #210

Closed joshuaulrich closed 6 years ago

joshuaulrich commented 7 years ago

Description

plot.xts() always colors the histogram green/red when the series is above/below zero, regardless of col specified by the user.

Minimal, reproducible example

library(xts)
data(sample_matrix)
x <- as.xts(sample_matrix, dateFormat="Date")
layout(matrix(1:2, 2, 1))
plot(x[,4], type = "h", col = "grey")
plot(coredata(x[,4]), type = "h", col = "grey")

image