[R] A very basic line-plot question

Jinyan Huang jinyan.fr at gmail.com
Thu Feb 17 21:41:34 CET 2011


dat<-c(150,152,155,134,141)
plot(dat,type="o",ylim=c(100,160),xlab="Names",ylab="Height")

On Thu, Feb 17, 2011 at 7:45 PM, world peace <buysellrentoffer at gmail.com> wrote:
> Hi All
>
> I have data like this
>
>              tom   randy mike dan doug
> height       150   152     155  134 141
>
> I am trying to create a line plot, with names on X-axis and height measure
> on Y. how can i get it through R.
> I could get several versions which are close (dotchart, bargraph), but not
> quite the same thing.
>
> I am looking for something like
> http://www.statsoft.com/Portals/0/blog/line_plot.jpg
> with option to add more lines, such as weight measurement for above data.
>
> Thanks,
> A
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list