Re: [R] Putting a text box in a plot

2009-09-22 Thread Sergey Goriatchev
Hello, Jim

Thank you a lot for suggestions, I will check that package out. It
could be the one I used way back then! :-)

Best,
Sergey

On Tue, Sep 22, 2009 at 01:55, Jim Lemon j...@bitwrit.com.au wrote:
 On 09/21/2009 07:42 PM, Sergey Goriatchev wrote:

 Hello everyone,

 I have a plot and I want to but a (formatted) box containing text and
 numbers, say:
 Mean: 0.1
 St.Deviation: 1.1
 Skewness: 1.1
 Kurtosis: 0.5

 I know there is a way to do this, there is a function in some library,
 but it's been years since
 I used this function, and I do not remember where I found it.
 Could anyone help out?

 Thank you in advance!
 Sergey



 Hi Sergey,
 Maybe addtable2plot in the plotrix package will do what you want.

 Jim





-- 
I'm not young enough to know everything. /Oscar Wilde
Experience is one thing you can't get for nothing. /Oscar Wilde
When you are finished changing, you're finished. /Benjamin Franklin
Tell me and I forget, teach me and I remember, involve me and I learn.
/Benjamin Franklin
Luck is where preparation meets opportunity. /George Patten

Kniven skärpes bara mot stenen.

__
R-help@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.


Re: [R] Putting a text box in a plot

2009-09-21 Thread baptiste auguie
Hi,

Maybe the textplot() function in the gplots package?

HTH,

baptiste

2009/9/21 Sergey Goriatchev serg...@gmail.com:
 Hello everyone,

 I have a plot and I want to but a (formatted) box containing text and
 numbers, say:
 Mean: 0.1
 St.Deviation: 1.1
 Skewness: 1.1
 Kurtosis: 0.5

 I know there is a way to do this, there is a function in some library,
 but it's been years since
 I used this function, and I do not remember where I found it.
 Could anyone help out?

 Thank you in advance!
 Sergey

 --
 Kniven skärpes bara mot stenen.

 __
 R-help@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.


__
R-help@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.


Re: [R] Putting a text box in a plot

2009-09-21 Thread baptiste auguie
Where do you want this text to be placed then?

maybe a call to legend(), or mtext() would suffice, it's hard to say
more without a reproducible example.


baptiste



2009/9/21 Sergey Goriatchev serg...@gmail.com:
 Hi, Baptiste

 Yes, I've found textplot() function, but I doubt it is the one I need.
 What I have is a density plot, and I want to add to this density plot
 a text box containing the stats I mentioned in previous email.
 I could do that kind of stuff with simple text() function, but then
 everytime x values change I will have to change x-axis output
 coordinates in text() function.
 No, there must be another function somewhere that produces these text boxes.

 Best,
 Sergey

 On Mon, Sep 21, 2009 at 11:49, baptiste auguie
 baptiste.aug...@googlemail.com wrote:
 Hi,

 Maybe the textplot() function in the gplots package?

 HTH,

 baptiste

 2009/9/21 Sergey Goriatchev serg...@gmail.com:
 Hello everyone,

 I have a plot and I want to but a (formatted) box containing text and
 numbers, say:
 Mean: 0.1
 St.Deviation: 1.1
 Skewness: 1.1
 Kurtosis: 0.5

 I know there is a way to do this, there is a function in some library,
 but it's been years since
 I used this function, and I do not remember where I found it.
 Could anyone help out?

 Thank you in advance!
 Sergey

 --
 Kniven skärpes bara mot stenen.

 __
 R-help@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.





 --
 I'm not young enough to know everything. /Oscar Wilde
 Experience is one thing you can't get for nothing. /Oscar Wilde
 When you are finished changing, you're finished. /Benjamin Franklin
 Tell me and I forget, teach me and I remember, involve me and I learn.
 /Benjamin Franklin
 Luck is where preparation meets opportunity. /George Patten

 Kniven skärpes bara mot stenen.


__
R-help@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.


Re: [R] Putting a text box in a plot

2009-09-21 Thread Sergey Goriatchev
Hi, Baptiste

Yes, I've found textplot() function, but I doubt it is the one I need.
What I have is a density plot, and I want to add to this density plot
a text box containing the stats I mentioned in previous email.
I could do that kind of stuff with simple text() function, but then
everytime x values change I will have to change x-axis output
coordinates in text() function.
No, there must be another function somewhere that produces these text boxes.

Best,
Sergey

On Mon, Sep 21, 2009 at 11:49, baptiste auguie
baptiste.aug...@googlemail.com wrote:
 Hi,

 Maybe the textplot() function in the gplots package?

 HTH,

 baptiste

 2009/9/21 Sergey Goriatchev serg...@gmail.com:
 Hello everyone,

 I have a plot and I want to but a (formatted) box containing text and
 numbers, say:
 Mean: 0.1
 St.Deviation: 1.1
 Skewness: 1.1
 Kurtosis: 0.5

 I know there is a way to do this, there is a function in some library,
 but it's been years since
 I used this function, and I do not remember where I found it.
 Could anyone help out?

 Thank you in advance!
 Sergey

 --
 Kniven skärpes bara mot stenen.

 __
 R-help@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.





-- 
I'm not young enough to know everything. /Oscar Wilde
Experience is one thing you can't get for nothing. /Oscar Wilde
When you are finished changing, you're finished. /Benjamin Franklin
Tell me and I forget, teach me and I remember, involve me and I learn.
/Benjamin Franklin
Luck is where preparation meets opportunity. /George Patten

Kniven skärpes bara mot stenen.

__
R-help@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.


Re: [R] Putting a text box in a plot

2009-09-21 Thread Sergey Goriatchev
Here is a kind of example:

plot(density(rnorm(1000)))
text(c(2,2),c(0.2,0.21),labels=c(Skewness,Kurtosis), pos=4, cex=0.7)
text(c(3,3),c(0.2, 0.21), labels=c(1.1, 2.2), pos=4, cex=0.7)

There is a function in some library that produces text boxes (with
borders) that can be placed inside a plot.
That is what I need - a bordered box containing text inside a plot. So
legend() and mtext() do not apply here, and text() is just too raw.
There is a special function for that, as I say. I once asked on an R
forum, and somebody directed me to this function. Unfortunately, I am
not successful googling that question of mine. It's been a few years.

Best,
Sergey


On Mon, Sep 21, 2009 at 12:13, baptiste auguie
baptiste.aug...@googlemail.com wrote:
 Where do you want this text to be placed then?

 maybe a call to legend(), or mtext() would suffice, it's hard to say
 more without a reproducible example.


 baptiste



 2009/9/21 Sergey Goriatchev serg...@gmail.com:
 Hi, Baptiste

 Yes, I've found textplot() function, but I doubt it is the one I need.
 What I have is a density plot, and I want to add to this density plot
 a text box containing the stats I mentioned in previous email.
 I could do that kind of stuff with simple text() function, but then
 everytime x values change I will have to change x-axis output
 coordinates in text() function.
 No, there must be another function somewhere that produces these text boxes.

 Best,
 Sergey

 On Mon, Sep 21, 2009 at 11:49, baptiste auguie
 baptiste.aug...@googlemail.com wrote:
 Hi,

 Maybe the textplot() function in the gplots package?

 HTH,

 baptiste

 2009/9/21 Sergey Goriatchev serg...@gmail.com:
 Hello everyone,

 I have a plot and I want to but a (formatted) box containing text and
 numbers, say:
 Mean: 0.1
 St.Deviation: 1.1
 Skewness: 1.1
 Kurtosis: 0.5

 I know there is a way to do this, there is a function in some library,
 but it's been years since
 I used this function, and I do not remember where I found it.
 Could anyone help out?

 Thank you in advance!
 Sergey

 --
 Kniven skärpes bara mot stenen.

 __
 R-help@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.





 --
 I'm not young enough to know everything. /Oscar Wilde
 Experience is one thing you can't get for nothing. /Oscar Wilde
 When you are finished changing, you're finished. /Benjamin Franklin
 Tell me and I forget, teach me and I remember, involve me and I learn.
 /Benjamin Franklin
 Luck is where preparation meets opportunity. /George Patten

 Kniven skärpes bara mot stenen.





-- 
I'm not young enough to know everything. /Oscar Wilde
Experience is one thing you can't get for nothing. /Oscar Wilde
When you are finished changing, you're finished. /Benjamin Franklin
Tell me and I forget, teach me and I remember, involve me and I learn.
/Benjamin Franklin
Luck is where preparation meets opportunity. /George Patten

Kniven skärpes bara mot stenen.

__
R-help@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.


Re: [R] Putting a text box in a plot

2009-09-21 Thread Gabor Grothendieck
Try this:

plot(1:10)
A - 1; B - 2
legend(topleft, leg = paste(c(A, B), c(A, B), sep = =))

or
RSiteSearch(text box)
RSiteSearch(text plot)

On Mon, Sep 21, 2009 at 5:42 AM, Sergey Goriatchev serg...@gmail.com wrote:
 Hello everyone,

 I have a plot and I want to but a (formatted) box containing text and
 numbers, say:
 Mean: 0.1
 St.Deviation: 1.1
 Skewness: 1.1
 Kurtosis: 0.5

 I know there is a way to do this, there is a function in some library,
 but it's been years since
 I used this function, and I do not remember where I found it.
 Could anyone help out?

 Thank you in advance!
 Sergey

 --
 Kniven skärpes bara mot stenen.

 __
 R-help@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.


__
R-help@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.


Re: [R] Putting a text box in a plot

2009-09-21 Thread Jim Lemon

On 09/21/2009 07:42 PM, Sergey Goriatchev wrote:

Hello everyone,

I have a plot and I want to but a (formatted) box containing text and
numbers, say:
Mean: 0.1
St.Deviation: 1.1
Skewness: 1.1
Kurtosis: 0.5

I know there is a way to do this, there is a function in some library,
but it's been years since
I used this function, and I do not remember where I found it.
Could anyone help out?

Thank you in advance!
Sergey

   

Hi Sergey,
Maybe addtable2plot in the plotrix package will do what you want.

Jim

__
R-help@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.