[R] kernel density plot

From: Muzna Alvi <muzna.alvi_at_gmail.com>
Date: Sun, 03 Apr 2011 16:26:09 +0530

I am using the following commands for plotting kernel density for three kinds of crops

density(s22$Net_income_Total.1, bw="nrd0",adjust=1, kernel=c("gaussian"))->t
plot(t, xlim=c(-30000,40000), main="Net Income Distribution", axes=F, ylim=c(0,0.00035). xlab="Value in Rupees") par(new=T)
density(s33$Net_income_Total.1, bw="nrd0",adjust=1, kernel=c("gaussian"))->u
plot(u, xlim=c(-30000,40000), axes=F, main="", col="red", ylim=c(0,0.00035)) par(new=T)
density(s44$Net_income_Total.1, bw="nrd0",adjust=1, kernel=c("gaussian"))->v
plot(v, xlim=c(-30000,40000), col="blue", axes=F, main="", ylim=c(0,0.00035))

the problem is that in the graph that is drawn

  1. the xlab gets hidden with the [N= and the bandwidth=] values
  2. when i do par(new=T) this N and bandwidth value appears multiple times..overlapping each time and making the graph look untidy..

Is there any way of making these N and Bandwidth values not appear in the graph?



        [[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. Received on Sun 03 Apr 2011 - 10:59:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 03 Apr 2011 - 19:00:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive