[R] negative values for barchart
Deepayan Sarkar
deepayan.sarkar at gmail.com
Thu Oct 23 19:53:13 CEST 2008
On 10/23/08, Plantky <ngokangmin at gmail.com> wrote:
> Hi all,
>
> My data has some positive and negative values, and I want to plot a
> barchart. The problem is that the y-axis zero is somewhere in the
> middle of the plot, and the graph starts with a negative value. How
> can I make the negative values appear as bars that are going below the
> y-axis zero?
> So the desired graph would have some bars projecting up and some down.
If you mean barchart() from the lattice package, just add 'origin = 0'
to your call.
-Deepayan
More information about the R-help
mailing list