Prateek, Does lattice do what you want? HTH Gerrit ppdat<-read.table(text="mou_mean,totalmrc_mean,rev_range,mou_range,Churn 23,24,25,27,1 45,46,47,49,1 43,44,45,47,1 45,46,47,49,0 56,57,58,60,0 67,68,69,71,1 67,68,69,71,0 44,45,46,48,1 33,34,35,37,0 90,91,92,94,1 87,88,89,91,1 76,77,78,80,1 33,34,35,37,1 44,45,46,48,1", sep=",",header=TRUE) library(lattice) ppdat <- reshape(ppdat,times=names(ppdat)[1:4], varying=list(names(ppdat)[1:4]), direction="long", timevar="Characteristic", v.name="Value") histogram(Churn~Value|Characteristic,nint=10,data=ppdat)
Message: 1 Date: Thu, 20 Apr 2017 16:54:35 +0530 From: prateek pande <prtkpa...@gmail.com> To: Hasan Diwan <hasan.di...@gmail.com> Cc: r-help mailing list <r-help@r-project.org> Subject: Re: [R] Multiple Histograms in R Message-ID: <cagajd9nzm31+l9awj5x-gwuohftcfi9srs-jlp7po-yh+go...@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" HI Hasan, Thanks for sharing the solution. Really appreciate it. But i was reading somewhere that we cannot use par with ggplot 2 . we can only use grid extra to have multiple plots in a single view. Is it right? Regards Prateek Message: 2 Date: Thu, 20 Apr 2017 12:26:47 +0000 From: Ulrik Stervbo <ulrik.ster...@gmail.com> To: prateek pande <prtkpa...@gmail.com>, Hasan Diwan <hasan.di...@gmail.com> Cc: r-help mailing list <r-help@r-project.org> Subject: Re: [R] Multiple Histograms in R Message-ID: <cakvaulnzvmbao5afmonzyvvp8vcjgzq-3ffccwx3egaipkx...@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Hi Prateek, maybe facet_* with ggplot is what you are looking for HTH Ulrik
______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.