Re: [R] Changing default plot behaviour

From: Thompson, David (MNR) <David.John.Thompson_at_ontario.ca>
Date: Wed, 09 Apr 2008 15:23:14 -0400

Thank you all for your help.
I successfully used Richard's suggestion (much like John's) and continued with my work, neglecting to respond to the list. Sorry about that.

Thanx again, DaveT.
>-----Original Message-----
>From: John Kane [mailto:jrkrideau_at_yahoo.ca]
>Sent: April 9, 2008 03:16 PM
>To: Thompson, David (MNR); r-help_at_r-project.org
>Subject: Re: [R] Changing default plot behaviour
>
>This may be a bit simple minded but why not change
>those commmands into a single function something like
>this and run it rather than the actual plot command?
>
>myfunction <- function(a) {
>plot(a, axes=FALSE)
> axis(1, tcl=0.5)
> axis(2, tcl=0.5)
> axis(3, tcl=0.5, labels=FALSE)
> axis(4, tcl=0.5, labels=FALSE)
> box()
>}
>
>
>--- "Thompson, David (MNR)"
><David.John.Thompson_at_ontario.ca> wrote:
>
>> Hello,
>>
>> How would I make the default behaviour of my plots
>> produce output such
>> as the following (i.e. tick marks inside on all
>> axes, labels only on two
>> (arbitrary?) sides) without needing the five
>> additional commands each
>> time?
>>
>> plot(1:10, axes=FALSE)
>> axis(1, tcl=0.5)
>> axis(2, tcl=0.5)
>> axis(3, tcl=0.5, labels=FALSE)
>> axis(4, tcl=0.5, labels=FALSE)
>> box()
>>
>> Thanx, DaveT.
>> *************************************
>> Silviculture Data Analyst
>> Ontario Forest Research Institute
>> Ontario Ministry of Natural Resources
>> david.john.thompson_at_ontario.ca
>> http://ofri.mnr.gov.on.ca
>>
>> ______________________________________________
>> R-help_at_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.
>>
>
>
>
>
>__________________________________________________________________
>Looking for the perfect gift? Give the gift of Flickr!
>
>http://www.flickr.com/gift/
>



R-help_at_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. Received on Wed 09 Apr 2008 - 19:31:28 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Apr 2008 - 20:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive