[R] adding line to spinogram
Viktor Tron
v.tron at ed.ac.uk
Mon May 15 13:24:18 CEST 2006
Dear all,
I wonder what's special about spinograms {vcd} that prevents me from using
it the way I do with other plots.
I do:
> spine(f.speaker.identity ~ x.log.lengthening,
> data=ms,breaks=45,gp=gpar(fill=c("red","green")),xlab="length difference
> (log ms)",ylab="speaker")
> curve(0*x,add=T)
Error in plot.xy(xy.coords(x, y), type = type, col = col, lty = lty, ...) :
plot.new has not been called yet
OK, if I do
> curve(0*x,add=)
> spine(f.speaker.identity ~ x.log.lengthening,
> data=ms,breaks=45,gp=gpar(fill=c("red","green")),xlab="length difference
> (log ms)",ylab="speaker")
> curve(0*x,add=T)
then the plot is what I want, but note that I had to use y=0 to get the
line put at 0.5!!!! so it is already suspicious.
But then:
> dev.print(pdf,"mde_speakerration_by_lengthening.pdf")
Error in dev.copy(device = function (file = ifelse(onefile, "Rplots.pdf",
:
invalid graphics state
Can anyone suggest a remedy?
Viktor
More information about the R-help
mailing list