# Illustrate longCatPlot with the legend outside the plot
par(mfrow=c(1,1), bg='cornsilk3', mar=c(5.1, 4.1, 4.1, 8.1), xpd=TRUE)
cols <- longCatPlot(
longCat(example3),
legendBuffer=0,
main='Horizontal Line Plot')
legend(7.1, 100, legend=1:5, col=cols, lty=1, lwd=2)
par(bg='transparent', mar = c(5, 4, 4, 2) + 0.1, xpd=FALSE)
## Not run:
# # for data sets with many rows, writing directly to a file
# # is much faster and unaffected by device resizing, see ?pdf
# pdf('C:/mydir/mysubdir/myfile.pdf')
# par(bg='cornsilk3')
# longCatPlot(f3lc, main='Sorted', colScheme='heat', lwd=2)
# par(mfrow=c(1,1), bg='transparent')
# dev.off()
# # see ?jpeg for picture file options
# ## End(Not run)
Run the code above in your browser using DataLab