On 11/22/2012 05:15 AM, Rosario Scandurra wrote:
Hi,

I want to generate an histogram and plot on the y axis the percentage of a
categorical variable and on the x axis a nominal variable. I want to move
the origin to have 2 categories below 0. Hope somebody could help me.
Thanks.

Hi Rosario,
If you already have your percentages, the barplot function will display them like most people expect an histogram to look by setting space=0. See the "names.arg" argument to have the names of your nominal variables on the x axis. I'm not sure exactly what you mean by wanting 2 categories below 0. If these are negative percentages, the barplot function will automatically handle them.

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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to