hi, My code: data<-matrix(data=c(0.425,0.5,0.75,0.125,0.25,0.475,0.375,0.25,0.625,0.5,0.1,0.125,0,0.25,0.25),nrow=3,ncol=5,byrow=TRUE, dimnames=list(c("Good","Medium","Bad"),c("Content","Logistic","Trainer","Supply","User contribution"))) plot(corresp(data,nf=2),xlim=c(-1,1),ylim=c(-1,1)); The plot is illegible, I want to do this in 3d, but I don't know how! please help me, send me source if you can! thanks Sabine --------------------------------- [[alternative HTML version deleted]]
On 6/9/05, Navarre Sabine <navarre_sabine at yahoo.fr> wrote:> hi, > > My code: > > data<-matrix(data=c(0.425,0.5,0.75,0.125,0.25,0.475,0.375,0.25,0.625,0.5,0.1,0.125,0,0.25,0.25),nrow=3,ncol=5,byrow=TRUE, dimnames=list(c("Good","Medium","Bad"),c("Content","Logistic","Trainer","Supply","User contribution"))) > > plot(corresp(data,nf=2),xlim=c(-1,1),ylim=c(-1,1)); > > The plot is illegible,Here is the code I have been using for plotting the columns. It should be relatively simple to extend this to plot the rows too. colplot <- function(x, names = rownames(x$cs), cex = .6, adj = 1.5, ...) { plot(x$cs, ...) text(x$cs, names, cex = cex, adj = adj) arrows(0,0,x$cs[,1],x$cs[,2],len=.1,col="red") abline(h=0, v=0) invisible(x$cs) } colplot(corresp(data, nf = 2), xlim = c(-2,2), cex = .5)
On Thu, 2005-06-09 at 14:40 +0200, Navarre Sabine wrote:> hi, > > My code: > > data<-matrix(data=c(0.425,0.5,0.75,0.125,0.25,0.475,0.375,0.25,0.625,0.5,0.1,0.125,0,0.25,0.25),nrow=3,ncol=5,byrow=TRUE, dimnames=list(c("Good","Medium","Bad"),c("Content","Logistic","Trainer","Supply","User contribution"))) > > plot(corresp(data,nf=2),xlim=c(-1,1),ylim=c(-1,1)); > > The plot is illegible, I want to do this in 3d, but I don't know how! > > please help me, send me source if you can!What's wrong with the biplot function that is used in the example of corresp help page? That is: biplot(corresp(data,nf=2)) It seems to give a legible plot with your data (that you named data, a bad idea). At least in my screen. cheers, jari oksanen -- Jari Oksanen <jarioksa at sun3.oulu.fi>
On Thu, 2005-06-09 at 14:40 +0200, Navarre Sabine wrote:> My code: > > data<-matrix(data=c(0.425,0.5,0.75,0.125,0.25,0.475,0.375,0.25,0.625,0.5,0.1,0.125,0,0.25,0.25),nrow=3,ncol=5,byrow=TRUE, dimnames=list(c("Good","Medium","Bad"),c("Content","Logistic","Trainer","Supply","User contribution"))) > > plot(corresp(data,nf=2),xlim=c(-1,1),ylim=c(-1,1)); > > The plot is illegible, I want to do this in 3d, but I don't know how!You need more data to do that in 3d. You have three rows, and you can get only 2d with corresp. You can use scatterplot3d or rgl functions for 3d plotting (both in packages with the same name) after you get data where you have more than two axes. These figures easily get illegible, though. cheers (again), jari oksanen -- Jari Oksanen <jarioksa at sun3.oulu.fi>