Hello Pascal,

Thank you for your reply. But I couldn't find how can I use the same
concept to my data.

The code I have used is as follows:

levelplot(age2100$z~age2100$x+age2100$y, as.data.frame(age2100),
          panel=function(x,y,subset,...)
          {
            panel.levelplot.points(x,y,subset,...)
            sp.polygons(hello)
          },
          aspect = "iso", scales = list(draw=FALSE), xlab="Eastings", ylab
= "Northings",
          cuts=40,smooth=T,
          colorkey = list(space = "right"),
          col.regions = rainbow(100, start = 3/15, end = 1),
          xlim=c(435000,468900),ylim=c(3337500,3374500),
          autokey=list(title="An image"),
          main="",
          col.symbol=0)

where age2100 is a dataset with x, y and z coordinates. and I have added a
polygon here.

I found it very difficult to relate with that example.

Another trial I did was using
grid.arrange(p1, p1, p1,ncol=2)

This way I got the three plots not sharing the same legend. Can anyone
suggest with the code I provided ?

Janesh


On Wed, Feb 13, 2013 at 6:19 PM, Pascal Oettli <kridox@ymail.com> wrote:

> Hello,
>
> Please have a look at the 2nd example given by ?levelplot ("lattice"
> package).
>
> It uses a data frame.
>
> HTH,
> Pascal
>
>
> Le 14/02/2013 08:46, Janesh Devkota a écrit :
>
>> Hello All,
>>
>> I have created a levelplot and I want to use multipanel levelplot with
>> same
>> common color legend.
>>
>> Lets say I have a plot with name p1.
>> I tried some methods such as:
>>
>> print(p1, split=c(1,1,1,2), more=TRUE)
>> print(p1, split=c(1,2,1,2))
>>
>> I couldn't control the look and feel of the plot with that function.
>>
>> I tried another method:
>>
>> print(p1, position=c(0, .5, 1, 1), more=TRUE)
>> print(p1, position=c(0, 0, 1, .5))
>>
>> These methods would just make two columns of the plot at center.
>>
>> I think I need to use the trellis function but I couldn't figure out. Can
>> anyone show an example of using multipanel levelplot with the common
>> legend
>> ?
>>
>> Thanks.
>>
>> Janesh
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________**_________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/**listinfo/r-sig-geo<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>>
>>

	[[alternative HTML version deleted]]

