[R] Re: RSvgDevice & sapply(plotmeans)

T Jake Luciani jake.luciani at riskmetrics.com
Mon Dec 30 19:46:05 CET 2002


I'll try fixing the problem shortly.

Thanks for the feedback.

Jake

On Fri, 2002-12-27 at 05:20, Christian Schulz wrote:
> Hi,
> anybody know why this not works for several
> plots ?
> When i set onefile=T the plots are stacked one about another
> , onefile=F only the first plot is shown in AllbusMeansPlots.svg.
> [h2 is a data.frame]
> ......hist and sapply works for several plots  nice with RSvgDevice !
> Maybe setting the title after apply is a problem, but until yet i didn't
> found a better solution ?
> 
> library(RSvgDevice)
> library(gregmisc)
> devSVG(file = "AllbusMeanPlots.svg", width = 10, height = 8,
>        bg = "lightblue", fg = "white", onefile=T, xmlHeader=TRUE)
> #par(bg="lightblue",ann=T)
> plt <- function(x) {
>    plotmeans(h2[,x] ~
> h2$V174,ylab=names(h2)[x],xlab="InglehartIndex",mean.labels=T,
>    connect=list(1:2,3:4,4:5),ccol="red",pch=7,barwidth=1,barcol="black")
>    title("Mittelwert-Plots Allbus 1998")
>    }
> sapply((2:ncol(h2)),plt)
> dev.off()
> 
> 
> Thanks for advance
> christian




More information about the R-help mailing list