Skip to content
Back to formatted view

Raw Message

Message-ID: <eb555e660904061157r3c6f83b2kebf78607e2e4870@mail.gmail.com>
Date: 2009-04-06T18:57:48Z
From: Deepayan Sarkar
Subject: contourplot label color
In-Reply-To: <49DA2702.2060202@meteo.fr>

On Mon, Apr 6, 2009 at 9:00 AM, bruno joly <bruno.joly at meteo.fr> wrote:
> Hi everyone,
>
> I am new to the list.
> My problem is to change the color of the label in a contour plot. The plot
> is quite dark and I'd like to have the line and label white, it works for
> the line with a simple "col", but for the labels I need to pass throught a
> panel call and :
>
>> contourplot(Prob ~ D.CSW *
>> D.CS,data=grid,region=TRUE,col="white",panel=function(x,y,z,...){panel.contourplot(...,labels=list(col="white"),...)})
>
> give me the answer "the argument 'label' may correspond to other variables"
> (I translate the error message from my ?french version)

You don't need a panel function; just use

 contourplot(Prob ~ D.CSW * D.CS,data=grid,region=TRUE,
             col="white",labels=list(labels = TRUE, col="white"))

(the documentation suggests that the 'labels=TRUE' is unnecessary, but
that is not so).

-Deepayan