[R] Little graph questions!
Deepayan Sarkar
deepayansarkar at yahoo.com
Sun Feb 17 18:17:49 CET 2002
--- Paul Johnson <pauljohn at ku.edu> wrote:
> 1. When I use paste to edit a title, it inserts spaces where I don't
> want them.
>
> See the picture here:
>
> http://lark.cc.ukans.edu/~pauljohn/R/ExampleCode/gamma4.png
>
> and note that, after the equal signs and the number 1, there is a space
> inserted whenever there is a comma separating text from variable. The
> code in question is:
>
> http://lark.cc.ukans.edu/~pauljohn/R/ExampleCode/template_gamma4.r
>
> the line I use to set the title is:
>
> oneHist <- hist(oneGamma,main=paste("here is one sample from your
> gamma(sh=",sh,",sc=",sc,")"))
Use sep = "" in paste() (defaults to sep = " ").
> 3. In all of these examples, I have had trouble positioning text in
> figures. Because I don't know what the plotted values will be until the
> model is run, it is hard to write coordinates for text(x,y,""). I
> frequently wish there were a way to say "top left part of graph", but
> the best i can come up with is to find the coordinates of the max or min
> values of x and y and put the text there.
>
> I have that code in the bottom of this one:
>
> http://lark.cc.ukans.edu/~pauljohn/R/ExampleCode/template_poisson4.r
>
>
> After using Axum for years, this seems a bit odd to me, but I'm willing
> to do it, if that is what you really intend us to do.
I'm not sure what exactly you're looking for, but have you tried working
with par("usr") ?
Deepayan
__________________________________________________
Yahoo! Sports - Coverage of the 2002 Olympic Games
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list