Hello guys, I would to plot a bar line between to curves like in excel as shown in the following image. but i do not know how I can do that in R. http://r.789695.n4.nabble.com/file/n2337089/excel_Plot.png any help would appreciate. -- View this message in context: http://r.789695.n4.nabble.com/Plot-bar-lines-like-excel-tp2337089p2337089.html Sent from the R help mailing list archive at Nabble.com.
On Aug 24, 2010, at 1:40 PM, abotaha wrote:> > Hello guys, > > I would to plot a bar line between to curves like in excel as shown > in the > following image. but i do not know how I can do that in R. > http://r.789695.n4.nabble.com/file/n2337089/excel_Plot.png > any help would appreciate. >?segments And note that supplying x0 will suffice in this instance since x1=x0. For worked solutions, reproducible code is needed (as always stated in the message footers.) -- David Winsemius, MD West Hartford, CT
Hi: This is pretty straightforward to do in ggplot2, but it would be nice to have some data to work with (hint). The job requires processing the two input series and dates with melt() from the reshape package, a couple of opts() to change, proper rotation of the dates, etc. It's easier to show how to do it with actual data rather than to lay out the steps. Dennis On Tue, Aug 24, 2010 at 10:40 AM, abotaha <yaseen0202@gmail.com> wrote:> > Hello guys, > > I would to plot a bar line between to curves like in excel as shown in the > following image. but i do not know how I can do that in R. > http://r.789695.n4.nabble.com/file/n2337089/excel_Plot.png > any help would appreciate. > > -- > View this message in context: > http://r.789695.n4.nabble.com/Plot-bar-lines-like-excel-tp2337089p2337089.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. >[[alternative HTML version deleted]]
Thanks a lot for the nice explanation. however, you mention that it will be nicer if there is data. yes you are right it be very kind of you if you include a simple example. where my data are: x1<-c(11.5,9.38,9.3,9.8,9,9.06,9.42,8.8,9.05,8.14,8.2,7.59,6.92,6.47,7.12, 7.47,6.81,8.41,9.64,9.62,9.2,8.92,8,7.6,7.6,7.19,6.94,6.91,7,7.25,6.6,7.18,7.78, 7.37,7.29,6.71,7.05,6.69,6.05,6.38,6.18,7.67,7.34,7.13,6.95,6.8,6.45,6.81,6.27,6.35) x2<-c(11.5,8.959535,9.728104,9.609262,8.755494,9.221545,8.244458,7.63944,7.92052,7.690449,7.853247, 7.239616,6.609007,5.92946,6.47822,5.906936,6.966004,8.630517,9.506582,9.57479,9.236638,9.581875,8.838992,8.368731,8.608884,7.998023,7.918123,7.832322,7.930177,7.479222,6.866978,7.454062,8.206185,7.344037,7.059774,6.547646,7.005803,6.623987,5.992691,6.313481,6.194613,6.224266,7.084932,6.568976,6.43866,5.70081,6.7593,6.6929,6.46806,5.964816) regards, -- View this message in context: http://r.789695.n4.nabble.com/Plot-bar-lines-like-excel-tp2337089p2337394.html Sent from the R help mailing list archive at Nabble.com.
Great ...... thanks for the to much help and i too appreciate hel p and explanation Cheers -- View this message in context: http://r.789695.n4.nabble.com/Plot-bar-lines-like-excel-tp2337089p2338158.html Sent from the R help mailing list archive at Nabble.com.