Skip to content
Prev 377760 / 398502 Next

[R studio] Plotting of line chart for each columns at 1 page

Hello Sir,

I am extremely Sorry for the late reply.

Ok now, I am sending my data and output, and would like to discuss my
queries one by one.

This is my final code.

pdf("EMs.pdf",width=20,height=20)
par(mfrow=c(5,4))
# import your first sheet here (16 columns)
ncolumns<-ncol(EMs1.1)
for(i in 1:ncolumns)
  plot(EMs1.1[,i],type="l",col = "Red", xlab="Time",
       ylab="APEn", main=names(EMs1.1)[i])
#import your second sheet here, (1 column)
ncolumns<-ncol(EMs2.1)
for(i in 1:ncolumns)
  plot(EMs2.1[,i],type="l",col = "Red", xlab="Time",
       ylab="APEn", main=names(EMs2.1)[i])
# import your Third sheet here, (1 column)
ncolumns<-ncol(EMs3.1)
for(i in 1:ncolumns)
  plot(EMs3.1[,i],type="l",col = "Red", xlab="Time",
       ylab="APEn", main=names(EMs3.1)[i])
# import your fourth sheet here, (1 column)
ncolumns<-ncol(EMs4.1)
for(i in 1:ncolumns)
  plot(EMs4.1[,i],type="l",col = "Red", xlab="Time",
       ylab="APEn", main=names(EMs4.1)[i])
# finish plotting
dev.off()

With this code, I found the following results. I attached The data files
(in rar file containing 4 excel files) and the output of my result.

*My First query is :*
I am having daily data, and without defining the date column, I obtained
the results. Therefore, I found the no. of observation in my X-axis of the
plots (in the attached result Pdf file). Now, I need the date column in my
X-axis with the corresponding data. I considered 03-01-1994 to 03-08-2017
(Date-Month-Year) by excluding 2 non-trading days per week.

I know that the frequency for defining yearly data is 1. So, I tried with
the following code being attached to the plot code, but not sure that
whether It is giving the appropriate plot or not?

*library(zoo)*
*y=zoo(EMs1, seq(from = as.Date("1994-01-01"), to = as.Date("2017-08-03"),
by = 1))*

*Therefore, kindly suggest me instead of getting the no. of observations in
the X-axis, how to get the date column in X-axis? *




[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
12/15/18,
10:39:06 AM
On Fri, Dec 14, 2018 at 2:48 PM Jim Lemon <drjimlemon at gmail.com> wrote: