[R] Customizing x-axis with stripchart

Duncan Murdoch murdoch at stats.uwo.ca
Sun Nov 25 02:56:50 CET 2007


On 24/11/2007 7:14 PM, Gabor Grothendieck wrote:
> On Nov 24, 2007 7:01 PM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
>> On 24/11/2007 6:22 PM, Paul Smith wrote:
>>> On Nov 24, 2007 11:14 PM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
>>>>>> With plot, one can use to the option 'axes=F' to remove axes. I have
>>>>>> tried it with stripchart, but no success. How can one then customize
>>>>>> the x-axis with stripchart?
>>>>> stripchart() doesn't give you that option.  You could edit the source to
>>>>> do it if you want.
>>>>>
>>>>> The r-devel version has more flexibility than R 2.6.0, but axes=F is not
>>>>> currently there.  It probably should be.
>>>> It is now.  So your choices are to edit the stripchart code in an
>>>> released version, or try out r-devel.  If you're using a binary build,
>>>> better wait a day or two for this change to make it in.
>>> Thanks, Duncan. I do not have the proper expertise to do that; so, I
>>> will wait for the next official release of R.
>> That's coming on Monday, and will be 2.6.1.  This won't make it into
>> there; you'll have to wait for 2.7.0 in April.
>>
>> But it really isn't that hard to do:  just type fix(stripchart), and it
>> will be pretty clear what to delete (the calls to box(), axis(), and
>> Axis()).
> 
> or download it from:
> 
> https://svn.r-project.org/R/trunk/src/library/graphics/R/stripchart.R
> 
> and then
> 
> source("stripchart.R")

Note that there are other changes in that version too:  stripchart() is 
a generic function, and it handles formulas more like boxplot() does 
than in 2.6.x or earlier.
> 
> (Is there some way to source it directly without downloading it and
> then sourcing it?
> source() does not appear to work directly with https:)

In Windows if you start R with the --internet2 option (which uses IE 
APIs instead of regular networking) and Windows trusts the certificate 
authority, then https urls can be handled.  But svn.r-project.org is 
self-signed, so it doesn't help in this case.

Duncan Murdoch



More information about the R-help mailing list