Hi r-help-boun...@r-project.org napsal dne 13.07.2009 10:45:50:
> Dear R-users, > I am using R(a package igraph) to calculate certain > topological features of networks. When I try to draw a plot between these > features I get an error. Following is the code I am using : > > *> plot(met_eco_deg,met_eco_bet) > > lmout<-lm(met_eco_bet ~ met_eco_deg) > > abline(lmout) > Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : > plot.new has not been called yet* > > *met_eco_deg* and *met_eco_bet* are the two objects generated from igraph > package. I don't get any error when I just use the plot function. Can anyone > help me out ?Thanks in advance. I do not have any experience in igraph but the error from abline states that plot is not initialised. I suspected that igraph is based on grid graphics and in this case you can not easily mix base and grid graphics, however from docs it seems that plain igraph plots are based on base graphics therefore it shall work. If your syntax is really only those 3 lines one after another do you see a plot after "plot(met_eco_deg,met_eco_bet)"? If not this is the problem. If after plot some plot appears and abline issues an error, than the problem is not so simple and without reproducible example it would be quite tricky to find out what is going on. Regards Petr > > > Regards, > > Anupam Sinha > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. ______________________________________________ R-help@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.