[R] need some help in plotting xy graph

Kurapati, Ravichandra (Ravichandra) ravichandra.kurapati at alcatel-lucent.com
Wed May 21 10:07:36 CEST 2008



fdf dataframe contains
 the data as follows

"bin"   "rate"  "overlay"       "x"
1       90      "Assign First/cc _from_SN_53 RNC_20_to_SN_50
RNC_21_Success Rate"       (04/01/08 16:02:30)
2       93      "Assign First/cc _from_SN_53 RNC_20_to_SN_50
RNC_21_Success Rate"       (04/01/08 16:07:30)
1       90      "Assign First/cc _from_SN_50 RNC_21_to_SN_53
RNC_20_Success Rate"       (04/01/08 16:02:30)
2       94      "Assign First/cc _from_SN_50 RNC_21_to_SN_53
RNC_20_Success Rate"       (04/01/08 16:07:30)


I want to plot a xygraph    
                  on xaxis-"x"  
                  on y-axis-"rate"    
                  groups=overlay

formd<-"rate ~ as.numeric(x)"
groups<-overlay
lgnd.txt<-levels(df$overlay)

print(xyplot(formula(formd),data = fdf, groups = overlay,
type = "b", as.table = TRUE, cex=0.20,main = "this is my first plot",
xlab = "Time", ylab = "session transfer",scales = c(xscales,yscales),key
= simpleKey(text = lgnd.txt, cex = 3/4,points = FALSE, lines = TRUE),
layout = c(1,1)))

but I didn't get any o/p

so
can u tel how can I get the desired xygraph from fdf dataframe



-----Original Message-----
From: Deepayan Sarkar [mailto:deepayan.sarkar at gmail.com] 
Sent: Wednesday, May 21, 2008 10:43 AM
To: Kurapati, Ravichandra (Ravichandra)
Cc: r-devel at r-project.org
Subject: Re: [Rd] need some help in plotting xy graph

On 5/20/08, Kurapati, Ravichandra (Ravichandra)
<ravichandra.kurapati at alcatel-lucent.com> wrote:
>
>    Dataframe    df contains
>
>
>
>  bin rate
overlay
>
>  1   1   90 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success
>  Rate
>
>  2   2   93 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success
>  Rate
>
>  3   1   90 Assign First/cc _from_SN_50 RNC_21_to_SN_53 RNC_20_Success
>  Rate
>
>  4   2   94 Assign First/cc _from_SN_50 RNC_21_to_SN_53 RNC_20_Success
>  Rate
>
>                  time
>
>  1 (04/01/08 16:02:30)
>
>  2 (04/01/08 16:07:30)
>
>  3 (04/01/08 16:02:30)
>
>  4 (04/01/08 16:07:30)

It would be more work to read in your data than I have time for. Could
you post it in a more convenient format? (The output of dput(fdf)
should be fine.)

-Deepayan



More information about the R-help mailing list