Skip to content
Back to formatted view

Raw Message

Message-ID: <20080929114021.GA23118@localhost>
Date: 2008-09-29T11:40:21Z
From: Philipp Pagel
Subject: histogram-like plot with two variables
In-Reply-To: <5BF7E00A-5D23-48D7-AA5E-598B677D5C10@licht-malerei.de>

On Mon, Sep 29, 2008 at 04:02:05AM +0200, J?rg Gro? wrote:
> Hi,
> 
> I want to plot a binomial propability distribution.
> 
> I know how to generate the data;
> 
>    x <- seq(from=0, to=14, by=1)
>    y <- dbinom(x, 14, 0.7, log = FALSE)
> 
> I tried:
> plot(x,y, type="h")
>   but the bars are very thin -is there a way to define the width?

yes - the lwd parameter controls line width. E.g.:

plot(x,y, type='h', lwd=5)

This is the way I usually plot count data - I prefer this over something
that looks like a normal histogram, because it reminds me that I am
looking at discrete values.

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl f?r Genomorientierte Bioinformatik
Technische Universit?t M?nchen
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://mips.gsf.de/staff/pagel