Skip to content
Back to formatted view

Raw Message

Message-ID: <501E26D9.1080806@bitwrit.com.au>
Date: 2012-08-05T07:55:05Z
From: Jim Lemon
Subject: how to put barchart and line chart in the same plot in ggplot2
In-Reply-To: <1344125878796-4639194.post@n4.nabble.com>

On 08/05/2012 10:17 AM, xin wei wrote:
> dear userR:
> I am trying to plot two dependent variables in the same plot in ggplot2.
> because these two variables have very different magnitude, I have to use a
> second Y axis. I hope one variable to be line and the other to be barchart.
> The x axis is continuous. Yet since I have to make barchart, I guess I have
> to treat it as discrete or categorical.
> I have been google searching for the whole afternoon but do not have any
> clue.
> Can anyone give me a direction (not have to be a complete answer...)?
>
Hi xin wei,
If you're desperate, have a look at twoord.plot in the plotrix package.

Jim