Basic graphics question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Basic graphics question

Sean Davis
I have a toy example given here:

    par(fig=c(0,1,0,0.05))
    par(mar=c(0,0,0,0))
    par(plt=c(0,1,0,1))
    par(oma=c(0,0,0,0))
    par(ann=F)
    plot(c(0,1),c(0,1),type='n',xlab='',ylab='',main='')
    rect(0,0,1,1,col='gray75')

What parameter am I missing to make the gray rectangle use the entire figure
region?  I am trying to build a plot from pieces, but there is a little bit
of margin left by the code above that prohibits the pieces from fitting
together perfectly.

Thanks,
Sean

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Basic graphics question

Prof Brian Ripley
On Tue, 24 Jan 2006, Sean Davis wrote:

> I have a toy example given here:
>
>    par(fig=c(0,1,0,0.05))
>    par(mar=c(0,0,0,0))
>    par(plt=c(0,1,0,1))
>    par(oma=c(0,0,0,0))
>    par(ann=F)
>    plot(c(0,1),c(0,1),type='n',xlab='',ylab='',main='')
>    rect(0,0,1,1,col='gray75')
>
> What parameter am I missing to make the gray rectangle use the entire figure
> region?  I am trying to build a plot from pieces, but there is a little bit
> of margin left by the code above that prohibits the pieces from fitting
> together perfectly.

pars 'xaxs' and 'yaxs'.

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Basic graphics question

Sean Davis



On 1/24/06 8:28 AM, "Prof Brian Ripley" <[hidden email]> wrote:

> On Tue, 24 Jan 2006, Sean Davis wrote:
>
>> I have a toy example given here:
>>
>>    par(fig=c(0,1,0,0.05))
>>    par(mar=c(0,0,0,0))
>>    par(plt=c(0,1,0,1))
>>    par(oma=c(0,0,0,0))
>>    par(ann=F)
>>    plot(c(0,1),c(0,1),type='n',xlab='',ylab='',main='')
>>    rect(0,0,1,1,col='gray75')
>>
>> What parameter am I missing to make the gray rectangle use the entire figure
>> region?  I am trying to build a plot from pieces, but there is a little bit
>> of margin left by the code above that prohibits the pieces from fitting
>> together perfectly.
>
> pars 'xaxs' and 'yaxs'.

Thanks.  That was what I was missing.

Sean

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html