Thank you.
The answers provides the right direction and a code was written accordingly.

One more request, if the label of axis X wants to be drawn from 5 to 1 (left
to right)
rather than 1 to 5, is it fine to change axis (4, at = NULL) ?
If so, which value should be input ?

Thanks again.

Elaine

code
plot(1:5,axes=FALSE)
axis(1)
axis(4)
box()




On Wed, Aug 25, 2010 at 5:39 PM, Jim Lemon <j...@bitwrit.com.au> wrote:

> On 08/25/2010 09:12 AM, elaine kuo wrote:
>
>> Dear List,
>>
>> I have a richness data distributing across 20 N to 20 S latitude. (120
>> E-140
>> E longitude).
>>
>>
>> I would like to draw the richness in the north hemisphere and a regression
>> line in the plot
>> (x-axis: latitude, y-axis: richness in the north hemisphere).
>> The above demand is done using plot.
>>
>> Then, south hemisphere richness and regression are required to be
>> generated
>> using
>> the same y-axis above but an x-axis on the left side of the y-axis.
>> (The higher latitude in the south hemisphere, the left it would move)
>>
>> Please kindly share how to design the south plot and regression line for
>> richness.
>> Also, please advise if any more info is in need.
>>
>>  Hi Elaine,
> Changing the position of the axes is easily done by changing the "side" and
> "pos" arguments of the "axis" function. If you want to move the y-axis to
> the right (or as you state it, the x axis to the left):
>
> # y axis on the left
> plot(1:5,axes=FALSE)
> axis(1)
> axis(2)
> # add a y axis one third of the way to the right
> xylim<-par("usr")
> axis(2,pos=xylim[1]+diff(xylim[1:2])/3)
> # add another y axis two thirds of the way
> axis(4,pos=xylim[2]-diff(xylim[1:2])/3)
> # add one more on the right
> axis(4)
>
> You can move the x axis up and down using the same tricks.
>
> Jim
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to