[R] Help barplots

Martyn Byng Martyn.Byng at nag.co.uk
Tue Jun 1 13:56:19 CEST 2010


Hi,

If you want to draw lines on your barchart then

aa = barplot(chromosome, col="purple", xlab="Oryza sativa Chromosomes",
border
= NA, space = 5, ylim = c(0,45))

returns the midpoints of each bar in the vector aa and then you can use
the lines() function to do the drawing.

Martyn

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of khush ........
Sent: 01 June 2010 12:02
To: r-help at r-project.org
Subject: [R] Help barplots

Dear All,

I am newbie to R, and I wanted to plot a barplots with R and in such a
way
that It will also show me position which I can plot on the bar line.

Here is my code that I am using to plot,

> chromosome <- c(40.2, 35.6, 36.1, 29.6, 31, 29.6, 31, 29.4, 28.2, 23,
23,
28.2)
>barplot (chromosome, col="purple", xlab="Oryza sativa Chromosomes",
border
= NA, space = 5, ylim = c(0,45))

I wanted to mark the position say on chromosome 1 (40.2) I need to mark
10.2
and on other also.
I also want to set the scale of y axis from 0,5,10,15,20,25,30,35,40,45
i.e
gap of 5 instead of 10.

please help me to solve my query....gurus.


Thank you
Jeet

	[[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.

________________________________________________________________________
This e-mail has been scanned for all viruses by Star.\ _...{{dropped:12}}



More information about the R-help mailing list