How to add axis labels to a multiplot in R?

I managed to create a single plot with 4 different diagrams. However the axis labels don't show up. As I am a beginner in R I'd appreciate if someone could show me how to add axis labels to this kind of plot. X-Axis: Degree Y-Axis: Log(cumulative distribution)

The graph uses igraph-Functions.

Here is the graph: And here is my code:

par(mar = rep(2, 4))  
par(mfrow=c(2,2))               
ddU <- degree.distribution(USAN_g_num, cumulative=TRUE, mode="in")
plot(ddU,  log="xy", col=ifelse(degree.distribution(USAN_g_num, cumulative=FALSE,     mode="in")==0 ,'white',"black"), 
 pch=ifelse(degree.distribution(USAN_g_num, cumulative=FALSE, mode="in")==0 ,10,20),
 cex=ifelse(degree.distribution(USAN_g_num, cumulative=FALSE, mode="in")==0 ,0,1),xlab="degree", ylab="log(cumulative frequency)",main="USAN") 

  ddS <- degree.distribution(SAg, cumulative=TRUE, mode="in")
  plot(ddS,  log="xy", col=ifelse(degree.distribution(SAg, cumulative=FALSE, mode="in")==0 ,'white',"black"),   
     pch=ifelse(degree.distribution(SAg, cumulative=FALSE, mode="in")==0 ,10,20),
     cex=ifelse(degree.distribution(SAg, cumulative=FALSE, mode="in")==0 ,0,1),xlab="degree", ylab="log(cumulative frequency)",main="SA") 

  ddO <- degree.distribution(OWg, cumulative=TRUE, mode="in")
  plot(ddO,  log="xy", col=ifelse(degree.distribution(OWg, cumulative=FALSE, mode="in")==0 ,'white',"black"),  
    pch=ifelse(degree.distribution(OWg, cumulative=FALSE, mode="in")==0 ,10,20),
    cex=ifelse(degree.distribution(OWg, cumulative=FALSE, mode="in")==0 ,0,1),xlab="degree", ylab="log(cumulative frequency)",main="OW") 

  ddT <- degree.distribution(STg, cumulative=TRUE, mode="in")
  plot(ddT,  log="xy", col=ifelse(degree.distribution(OWg, cumulative=FALSE, mode="in")==0 ,'black',"black"),  
    pch=ifelse(degree.distribution(STg, cumulative=FALSE, mode="in")==0 ,10,20),
    cex=ifelse(degree.distribution(STg, cumulative=FALSE, mode="in")==0 ,0,1),xlab="degree", ylab="log(cumulative frequency)",main="ST")

Thank you

Answers


You don't see the x and y axis labels because you set too narrow margin for the bottom and left side of plots with mar=. Try to increase it to 4 or higher.

par(mar = c(4,4,2,2))  
par(mfrow=c(2,2))
plot(1:10,xlab="mm",ylab="kk")
plot(1:10,xlab="mm",ylab="kk")
plot(1:10,xlab="mm",ylab="kk")
plot(1:10,xlab="mm",ylab="kk")

Need Your Help

Knockoutjs does not update value when select options changed

knockout.js

Problem is when select options got changed value is not being updated.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.