igraph-help
[Top][All Lists]

## Re: [igraph] Problems when plotting sinusoidal function after plotting a

 From: Charles Novaes de Santana Subject: Re: [igraph] Problems when plotting sinusoidal function after plotting a graph Date: Fri, 17 Apr 2015 20:09:04 +0200

By the way[2]: The problem persists is I use par(mfrow=c(2,2)) instead of layout. Please test with the following code:

library(igraph)

g<-erdos.renyi.game(30,0.4)
x<-1:100;

par(mfrow=c(2,2));
hist(degree(g),main="A");
plot(x,sin(x),type="l",xlab="x",ylab="sin(x)",xlim=c(40,90),main="B")
plot(g,main="C");box();
plot(x,sin(x),type="l",xlab="x",ylab="sin(x)",xlim=c(40,90),main="D")

So, it is one more evidence that the problem should be caused by the igraph.plotting. Any idea?

Best.

Charles

On Fri, Apr 17, 2015 at 3:06 PM, Charles Novaes de Santana wrote:
By the way: I am running igraph 0.7.1 with R 3.0.2 in Ubuntu 14.04.

Best,

Charles

On Fri, Apr 17, 2015 at 2:47 PM, Charles Novaes de Santana wrote:
Dear all,

I am trying to plot 4 different plots in the same figure using graphics::layout to organize the plots. The code below reproduces more or less what I am doing:

library(igraph)

g<-erdos.renyi.game(30,0.4)
x<-1:100;

m<-rbind(c(1,1,1,2,2,2),c(1,1,1,2,2,2),c(1,1,1,2,2,2),c(3,3,3,4,4,4),c(3,3,3,4,4,4),c(3,3,3,4,4,4));
layout(m);

hist(degree(g),main="A");
plot(x,sin(x),type="l",xlab="x",ylab="sin(x)",xlim=c(10,60),main="B")
plot(g,main="C");box();
plot(x,sin(x),type="l",xlab="x",ylab="sin(x)",xlim=c(10,60),main="D")

My problem is that the curve plotted in "D" (that is exactly the same as in "B") is shown out of the margins. I suppose it is out of margins because I plot a graph right before "D".

Does any of you have any idea if plotting a graph can have any effect in the margins of the next plot? Any clue about how to solve this problem?

Charles
--
Um axé! :)

--
Charles Novaes de Santana, PhD
http://www.imedea.uib-csic.es/~charles

--
Um axé! :)

--
Charles Novaes de Santana, PhD
http://www.imedea.uib-csic.es/~charles

--
Um axé! :)

--
Charles Novaes de Santana, PhD
http://www.imedea.uib-csic.es/~charles