Skip to content
Back to formatted view

Raw Message

Message-ID: <CADVKSzxEw3Wu=WB4aAh_=bF7GintH817dCL1qM_a2qVi5AMnDA@mail.gmail.com>
Date: 2012-05-16T00:13:01Z
From: Gundala Viswanath
Subject: How to use the value of "rect" to determine the location of legend

Given the attached plot,
how can I locate the center text with "Mean and SD" so that it can be
placed exactly under "---emp".?

The current code I have is this:

L = list(bquote(Em.Mean ==.(new_avg)),    bquote(Em.SD==.(new_std)),
bquote(Th.Mean ==.(theor_avg)),
    bquote(Th.SD==.(theor_sd)))

legend("topright", c(kids,"emp."), cex=0.7, bty="n", col=c(cm.colors(6), "red"),
    pch=c(rep(19, 6), -5), lty = c(0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0), )

# How can I locate this
legend("topcenter", cex=0.5, bty="n", legend=sapply(L, as.expression))

-G.V.