[R] corrgram
Kevin Wright
kw.stat at gmail.com
Tue Sep 25 19:25:03 CEST 2012
Um, Bert, did you try my example? It uses grid graphics to annotate a
base-graphics plot.
Kevin
On Tue, Sep 25, 2012 at 10:50 AM, Bert Gunter <gunter.berton at gene.com> wrote:
> Inline:
>
> On Tue, Sep 25, 2012 at 8:42 AM, Kevin Wright <kw.stat at gmail.com> wrote:
>> Claudia, When you are asking a question about a particular _package_,
>> you should try to contact the package maintainer with the question.
>>
>> Now, to answer your question...There is no simple way. You can always
>> use the "grid" package to annotate plots however you like.
>
> This is false of course. What you meant to say (I hope) is that you
> can use the grid package to annotate any plot drawn **with grid
> graphics** any way you light. This includes both the lattice and
> ggplot packages. As you said, the exact details of how to do it may
> not be exactly transparent (and I don't know whether they are or not
> in this case).
>
> Graphics drawn with the base graphics functionality are generally
> incompatible with grid graphics.
>
> Cheers,
> Bert
>
> Here is an
>> example that shows how it _could_ be done. Ugly, however.
>>
>> side.txt <- function (x = 0.5, y = 0.5, txt, cex, font, srt) {
>> NULL
>> }
>>
>> corrgram(mtcars[2:6], order=TRUE,
>> labels=c('Axle
>> ratio','Weight','Displacement','Cylinders','Horsepower'),
>> cex.labels=1.5,
>> upper.panel=panel.conf, lower.panel=panel.pie,
>> diag.panel=panel.minmax, text.panel=side.txt)
>>
>> require("grid")
>> grid.clip()
>> lab <- "Displacement"
>>
>> pushViewport(viewport(.04, .5, width = stringWidth(lab), angle=90,
>> height = unit(2, "lines"), name = "pagenum", gp
>> = gpar(fontsize = 8)))
>> grid.text(lab, gp=gpar(srt=45), just = c("left", "bottom"))
>> popViewport()
>>
>> pushViewport(viewport(.5, .04, width = stringWidth(lab),
>> height = unit(2, "lines"), name = "pagenum", gp
>> = gpar(fontsize = 8)))
>> grid.text(lab, gp=gpar(srt=45), just = c("left", "bottom"))
>> popViewport()
>>
>>
>>
>> On Tue, Sep 25, 2012 at 4:54 AM, paladini <paladini at beuth-hochschule.de> wrote:
>>> Hallo,
>>> I have a question concerning the function "correlogram" from
>>> library(corrgram).
>>>
>>> Is it possible do write the variable names not in the diagonal but on the
>>> left and at the buttom of the graphic?
>>> I searched the manual and tried a lot but didn't get it.
>>>
>>>
>>> Thank you very much and best regards
>>>
>>>
>>> Claudia
>>>
>>> ______________________________________________
>>> 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.
>>
>>
>>
>> --
>> Kevin Wright
>>
>> ______________________________________________
>> 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.
>
>
>
> --
>
> Bert Gunter
> Genentech Nonclinical Biostatistics
>
> Internal Contact Info:
> Phone: 467-7374
> Website:
> http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm
--
Kevin Wright
More information about the R-help
mailing list