patrick nguyen
2010-Nov-09 20:35 UTC
[R] help cannot put multiple chart Stacked Bar (from PerformanceAnalysis library) in a single plot
Hi I'm having problems displaying multiple chart.StackedBar from PerformanceAnalysis library on a single plot. I've tried using par(mfrow=c(2,1)) but that doesn't work. If I do it with barplot(), it works fine and I see both plots on a single plot.> plot(mfrow=c(2,1)) > barplot(blahblah) > barplot(blahblah)However if I try to use chart.StackedBar, the second entry appears to just overwrite the window.> plot(mfrow=c(2,1)) > chart.StackedBar(blahblah,date.format="%H:%M:%S",las=2, >colorset=rainbow12equal) > chart.StackedBar(blahblah,date.format="%H:%M:%S",las=2, >colorset=rainbow12equal)Any suggestions are greatly appreciated! -patrick
patrick nguyen
2010-Nov-09 20:41 UTC
[R] help cannot put multiple chart Stacked Bar (from PerformanceAnalysis library) in a single plot
Hi I'm having problems displaying multiple chart.StackedBar from PerformanceAnalysis library on a single plot. I've tried using par(mfrow=c(2,1)) but that doesn't work. If I do it with barplot(), it works fine and I see both plots on a single plot.> plot(mfrow=c(2,1)) > barplot(blahblah) > barplot(blahblah)However if I try to use chart.StackedBar, the second entry appears to just overwrite the window.> plot(mfrow=c(2,1)) > chart.StackedBar(blahblah,date.format="%H:%M:%S",las=2, >colorset=rainbow12equal) > chart.StackedBar(blahblah,date.format="%H:%M:%S",las=2, >colorset=rainbow12equal)Any suggestions are greatly appreciated! -patrick
salmajj at softhome.net
2010-Nov-09 21:41 UTC
[R] help cannot put multiple chart Stacked Bar (from PerformanceAnalysis library) in a single plot
Hi, try> par(new=T)patrick nguyen writes:> Hi > > I'm having problems displaying multiple chart.StackedBar from > PerformanceAnalysis library on a single plot. I've tried using > par(mfrow=c(2,1)) but that doesn't work. > > If I do it with barplot(), it works fine and I see both plots on a single plot. > >> plot(mfrow=c(2,1)) >> barplot(blahblah) >> barplot(blahblah) > > However if I try to use chart.StackedBar, the second entry appears to just > overwrite the window. > >> plot(mfrow=c(2,1)) >> chart.StackedBar(blahblah,date.format="%H:%M:%S",las=2, >>colorset=rainbow12equal) >> chart.StackedBar(blahblah,date.format="%H:%M:%S",las=2, >>colorset=rainbow12equal) > > Any suggestions are greatly appreciated! > > -patrick > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.