Try this:

# create data
x <- rbind("Not Stir"=c(400, 700), Stir=c(50, 180))
matplot(x, type='o', pch=16, cex=2, xaxt='n')
axis(1, at=1:2, labels=rownames(x))





On Sat, Jan 9, 2010 at 9:29 AM, lse1986 <sam_eden1986@yahoo.co.uk> wrote:

>
> Hey Jim,
>
> Thanks for your reply!
>
> I tried what you said, i still kept getting errors.
>
> here's what i want my graph to look like:
>
> http://i.imagehost.org/0474/Untitled_5.jpg
>
> i have x<-c("not stir", "stir")
>
> i can't plot it though :(
>
>
> Jim Lemon wrote:
> >
> > On 01/09/2010 12:38 PM, lse1986 wrote:
> >> Hi i want do a line graph.
> >>
> >> My y axis contains numeric values. My x axis contains non numeric
> >> statements.
> >>
> >> This is what i want the graph to look like.
> >>
> >> When i try to plot this graph on R it comes up with the following error
> >> message:
> >>
> >> "Error in plot.window(...) : need finite 'xlim' values
> >> In addition: Warning messages:
> >> 1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
> >> 2: In min(x) : no non-missing arguments to min; returning Inf
> >> 3: In max(x) : no non-missing arguments to max; returning -Inf"
> >>
> >>
> > Hi Sam,
> > While I don't know what you want the graph to look like, I would suggest
> > the following:
> >
> > xf<-factor(x)
> > plot(as.numeric(xf),rnorm(10),type="l",xaxt="n")
> > axis(1,at=1:10,labels=xf)
> >
> > Jim
> >
> > ______________________________________________
> > 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<http://www.r-project.org/posting-guide.html>
> > and provide commented, minimal, self-contained, reproducible code.
> >
> >
>
> --
> View this message in context:
> http://n4.nabble.com/Plotting-numeric-values-against-non-numeric-items-tp1010129p1010311.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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

	[[alternative HTML version deleted]]

