I am trying to make a candle chart in R.
In my sample 5m candle chart, rendered into PNG properly and neatly. Like the one below:
But when I give it real data with a week long 5m candle data, the chart renders all blurred like below:
The part of code I have used:
png( labels$pngfile, height=labels$height,width=labels$width)
par(mar=c(12,6,3,6))
plot( df$high, main=labels$title, xaxt="n", xlab="", ylab="price", ylim=c( mn, mx ), type="n",las=1 )
par( new=T )
plot( df$low, main="", axes=F, xlab="", ylab="", ylim=c( mn, mx ), type="n" )
segments( x0=xs, y0=df$open, x1=xs, y1=df$close, col=color_list, lwd=4 )
segments( x0=xs, y0=df$low, x1=xs, y1=df$high, col=color_list, lwd=1 )
dev.off()
Please suggest how to fix the blur. Thanks.