Skip to content
Back to formatted view

Raw Message

Message-ID: <89b6b8c90809140722hd3487bdnc1a6de31a8b5c7a4@mail.gmail.com>
Date: 2008-09-14T14:22:05Z
From: Yihui Xie
Subject: Scaling X axis from -1 to 1
In-Reply-To: <73f827b50809140713l753afb87g76bed5ad108c743b@mail.gmail.com>

2 * (x - min(x))/(max(x) - min(x)) - 1

On Sun, Sep 14, 2008 at 10:13 PM, Gundala Viswanath <gundalav at gmail.com> wrote:
> Hi,
>
> I have a density plot in which the x axis
> ranged from 0 to 2000.
>
> How can I scale the data so that the x-axis
> is scaled in -1 to 1 form?
>
> - Gundala Viswanath
> Jakarta - Indonesia
>


-- 
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China