Re: [R] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-05 Thread sunyeping via R-help

--From:Duncan 
Murdoch Send Time:2018 May 6 (Sun) 04:58To:孙业平 
; David Winsemius Cc:R Help 
Mailing List Subject:Re: [R] why the length and width of 
a plot region produced by the dev.new() function cannot be correctly set?
On 05/05/2018 11:33 AM, 孙业平 wrote:
> 
> --
> From:Duncan Murdoch 
> Send Time:2018 May 4 (Fri) 17:24
> To:孙业平 ; David Winsemius 
> Cc:R Help Mailing List 
> Subject:Re: [R] why the length and width of a plot region produced by 
> the dev.new() function cannot be correctly set?
> 
> On 04/05/2018 3:04 AM, sunyeping via R-help wrote:
>  >
>  > 
>--From:David 
>Winsemius Send Time:2018 May 4 (Fri) 13:25To:孙业平 
>Cc:R Help Mailing List Subject:Re: 
>[R] why the length and width of a plot region produced by the dev.new() 
>function cannot be correctly set?
>  >
>  >>   On May 3, 2018, at 6:28 PM, sunyeping via R-help  
>wrote:
>  >>
>  >>   When I check the size of the plot region usingdev.size("in")a new plot 
>region is produced and in the Rconsole I get[1] 5.33 5.322917
>  >
>  > Your test is all mangleed together. You failed in your duty to read the 
>list info and the Posting guide . NO HTML!
>  >
>  >>   If I mean to produce a plot region with size setting 
>bydev.new(length=3,width=3)a plot region is produced, but the size is 
>[2.281250, 5.322917], as detected by the de.size function. If I 
>type:dev.new(length=10,width=10)I get a plot region of with the size of 
>[7.614583, 5.322917]. It seems that the width of the new plot region cannot be 
>set, and tt is always 5.322917. The length of the new plot region can be set, 
>but it is always smaller that the values I set.What do I miss? What is the 
>correct way of setting the dimension of the new plot region? I will be 
>grateful to any help.Best regards,
>  >
>  > The size of the device is not the size of the plot region. You need to 
>take into account the margins. See ?par
>  > Thank you, David.I have read the par() document. Clearly the size of the 
>plot region is smaller than or equal to the divice size. However, if I produce 
>a graphic device with dev.new (length, width) or other functions, I find the 
>largest  width of the new device is always 5.3 inches whatever the values I 
>set, and the length of it is alway smaller than what I set.
> 
> The length and width aren't the first and second parameters for any
> device, and length isn't a parameter at all.  Try
> 
> dev.new(height = 10, width = 10)
> 
> and you should get a bigger device if it will fit on your screen.  If it
> won't fit, then you might get a smaller one, and you'll need to choose a
> non-screen device such as png() or pdf() instead of the default device.
> 
> Duncan Murdoch
> 
>Could you tell me how to produce a graphic divice with correct size
> that I set? I need this function because the graphic divice cannot
> accomendate all of the graph I make with some of plot tools such as
> ggtree. In ggtree plot, part of the tree tips label are invisible
> (https://www.dropbox.com/s/87gyusx7ay1xxu8/tree.pdf?dl=0) even I set
> "par(mar=rep(0,4))". So I think I must plot the tree on a larger graphic
> device.  Best regards.
>  >
>  >
>  >>
>  >>[[alternative HTML version deleted]]
>  >>
>  >>   __
>  >>   R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>  >> 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.
>  >
>  > David Winsemius
>  > Alameda, CA, USA
>  >
>  > 'Any technology distinguishable from magic is insufficiently advanced.'   
>-Gehm's Corollary to Clarke's Third Law
>  >
>  >
>  >
>  >
>  >
>  >  [[alternative HTML version deleted]]
>  >
>  > __
>  > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>  > 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.
>  >
> 
> "dev.new(height = 10, width = 10) " doesn't work neither. It produces a 
> device with a size of [ 5.760417, 5.75]. My computer is

Re: [R] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-05 Thread Duncan Murdoch

On 05/05/2018 11:33 AM, 孙业平 wrote:


--
From:Duncan Murdoch 
Send Time:2018 May 4 (Fri) 17:24
To:孙业平 ; David Winsemius 
Cc:R Help Mailing List 
Subject:Re: [R] why the length and width of a plot region produced by 
the dev.new() function cannot be correctly set?


On 04/05/2018 3:04 AM, sunyeping via R-help wrote:
 >
 > --From:David Winsemius 
Send Time:2018 May 4 (Fri) 13:25To:孙业平 
Cc:R Help Mailing List Subject:Re: [R] why 
the length and width of a plot region produced by the dev.new() function cannot be correctly set?
 >
 >>   On May 3, 2018, at 6:28 PM, sunyeping via R-help  
wrote:
 >>
 >>   When I check the size of the plot region usingdev.size("in")a new plot 
region is produced and in the Rconsole I get[1] 5.33 5.322917
 >
 > Your test is all mangleed together. You failed in your duty to read the list 
info and the Posting guide . NO HTML!
 >
 >>   If I mean to produce a plot region with size setting 
bydev.new(length=3,width=3)a plot region is produced, but the size is [2.281250, 
5.322917], as detected by the de.size function. If I 
type:dev.new(length=10,width=10)I get a plot region of with the size of [7.614583, 
5.322917]. It seems that the width of the new plot region cannot be set, and tt is 
always 5.322917. The length of the new plot region can be set, but it is always 
smaller that the values I set.What do I miss? What is the correct way of setting the 
dimension of the new plot region? I will be grateful to any help.Best regards,
 >
 > The size of the device is not the size of the plot region. You need to take 
into account the margins. See ?par
 > Thank you, David.I have read the par() document. Clearly the size of the 
plot region is smaller than or equal to the divice size. However, if I produce a 
graphic device with dev.new (length, width) or other functions, I find the largest 
 width of the new device is always 5.3 inches whatever the values I set, and the 
length of it is alway smaller than what I set.

The length and width aren't the first and second parameters for any
device, and length isn't a parameter at all.  Try

dev.new(height = 10, width = 10)

and you should get a bigger device if it will fit on your screen.  If it
won't fit, then you might get a smaller one, and you'll need to choose a
non-screen device such as png() or pdf() instead of the default device.

Duncan Murdoch

   Could you tell me how to produce a graphic divice with correct size
that I set? I need this function because the graphic divice cannot
accomendate all of the graph I make with some of plot tools such as
ggtree. In ggtree plot, part of the tree tips label are invisible
(https://www.dropbox.com/s/87gyusx7ay1xxu8/tree.pdf?dl=0) even I set
"par(mar=rep(0,4))". So I think I must plot the tree on a larger graphic
device.  Best regards.
 >
 >
 >>
 >>[[alternative HTML version deleted]]
 >>
 >>   __
 >>   R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 >> 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.
 >
 > David Winsemius
 > Alameda, CA, USA
 >
 > 'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law
 >
 >
 >
 >
 >
 >  [[alternative HTML version deleted]]
 >
 > __
 > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 > 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.
 >

"dev.new(height = 10, width = 10) " doesn't work neither. It produces a 
device with a size of [ 5.760417, 5.75]. My computer is a usual 14 
inch thankpad labtop. Is 5 ~ inches really the up limit of the size of 
the R graphic device in computer screen? I doubt it.


You ask questions in a very rude way.  I'm going to let you figure this 
one out by yourself.


Duncan Murdoch

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-05 Thread 孙业平 via R-help

--From:Duncan 
Murdoch Send Time:2018 May 4 (Fri) 17:24To:孙业平 
; David Winsemius Cc:R Help 
Mailing List Subject:Re: [R] why the length and width of 
a plot region produced by the dev.new() function cannot be correctly set?
On 04/05/2018 3:04 AM, sunyeping via R-help wrote:
> 
> --From:David 
>Winsemius Send Time:2018 May 4 (Fri) 13:25To:孙业平 
>Cc:R Help Mailing List Subject:Re: 
>[R] why the length and width of a plot region produced by the dev.new() 
>function cannot be correctly set?
> 
>>   On May 3, 2018, at 6:28 PM, sunyeping via R-help  
>>wrote:
>>   
>>   When I check the size of the plot region usingdev.size("in")a new plot 
>>region is produced and in the Rconsole I get[1] 5.33 5.322917
> 
> Your test is all mangleed together. You failed in your duty to read the list 
>info and the Posting guide . NO HTML!
> 
>>   If I mean to produce a plot region with size setting 
>>bydev.new(length=3,width=3)a plot region is produced, but the size is 
>>[2.281250, 5.322917], as detected by the de.size function. If I 
>>type:dev.new(length=10,width=10)I get a plot region of with the size of 
>>[7.614583, 5.322917]. It seems that the width of the new plot region cannot 
>>be set, and tt is always 5.322917. The length of the new plot region can be 
>>set, but it is always smaller that the values I set.What do I miss? What is 
>>the correct way of setting the dimension of the new plot region? I will be 
>>grateful to any help.Best regards,
> 
> The size of the device is not the size of the plot region. You need to take 
>into account the margins. See ?par
> Thank you, David.I have read the par() document. Clearly the size of the plot 
>region is smaller than or equal to the divice size. However, if I produce a 
>graphic device with dev.new (length, width) or other functions, I find the 
>largest  width of the new device is always 5.3 inches whatever the values I 
>set, and the length of it is alway smaller than what I set.

The length and width aren't the first and second parameters for any 
device, and length isn't a parameter at all.  Try

dev.new(height = 10, width = 10)

and you should get a bigger device if it will fit on your screen.  If it 
won't fit, then you might get a smaller one, and you'll need to choose a 
non-screen device such as png() or pdf() instead of the default device.

Duncan Murdoch

  Could you tell me how to produce a graphic divice with correct size 
that I set? I need this function because the graphic divice cannot 
accomendate all of the graph I make with some of plot tools such as 
ggtree. In ggtree plot, part of the tree tips label are invisible 
(https://www.dropbox.com/s/87gyusx7ay1xxu8/tree.pdf?dl=0) even I set 
"par(mar=rep(0,4))". So I think I must plot the tree on a larger graphic 
device.  Best regards.
> 
> 
>>   
>>[[alternative HTML version deleted]]
>>   
>>   __
>>   R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>   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.
> 
> David Winsemius
> Alameda, CA, USA
> 
> 'Any technology distinguishable from magic is insufficiently advanced.'   
>-Gehm's Corollary to Clarke's Third Law
> 
> 
> 
> 
> 
>  [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
> 

"dev.new(height = 10, width = 10) " doesn't work neither. It produces a device 
with a size of [ 5.760417, 5.75]. My computer is a usual 14 inch thankpad 
labtop. Is 5 ~ inches really the up limit of the size of the R graphic device 
in computer screen? I doubt it.
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-04 Thread MacQueen, Don
But:

> dev.new(height=10,width=10)
> dev.size('in')
[1] 10 10

Whereas

> dev.new(length=10,width=10)
> dev.size('in')
[1] 10  7

Obviously, because height was not specified, some default calculation was used 
to set the height. And length was ignored.

And thanks to Duncan Murdoch for pointing out that the correct arguments are 
height and width, not length and width.

And, yes, please send plain text email to R-help. Sending HTML email reduces 
the likelihood anyone will actually read your email.

-Don

--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
 
 

On 5/3/18, 6:28 PM, "R-help on behalf of sunyeping via R-help" 
 wrote:

When I check the size of the plot region usingdev.size("in")a new plot 
region is produced and in the Rconsole I get[1] 5.33 5.322917If I mean to 
produce a plot region with size setting bydev.new(length=3,width=3)a plot 
region is produced, but the size is [2.281250, 5.322917], as detected by the 
de.size function. If I type:dev.new(length=10,width=10)I get a plot region of 
with the size of [7.614583, 5.322917]. It seems that the width of the new plot 
region cannot be set, and tt is always 5.322917. The length of the new plot 
region can be set, but it is always smaller that the values I set.What do I 
miss? What is the correct way of setting the dimension of the new plot region? 
I will be grateful to any help.Best regards,

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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 -- To UNSUBSCRIBE and more, see
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] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-04 Thread Rui Barradas

Hello,

Is this cross posted from StackOverflow?

https://stackoverflow.com/questions/50127476/it-there-a-up-limit-for-the-size-of-the-plot-region-produced-by-the-dev-new-func

Cross posting is discouraged by r-help. See the posting guide regarding 
this.


The question is not exactly the same, though.


Hope this helps,

Rui Barradas

On 5/4/2018 5:26 PM, David Winsemius wrote:



On May 4, 2018, at 12:04 AM, sunyeping  wrote:


--
From:David Winsemius 
Send Time:2018 May 4 (Fri) 13:25
To:孙业平 
Cc:R Help Mailing List 
Subject:Re: [R] why the length and width of a plot region produced by the 
dev.new() function cannot be correctly set?



On May 3, 2018, at 6:28 PM, sunyeping via R-help  wrote:

When I check the size of the plot region usingdev.size("in")a new plot region 
is produced and in the Rconsole I get[1] 5.33 5.322917


Your test is all mangleed together. You failed in your duty to read the list 
info and the Posting guide . NO HTML!


If I mean to produce a plot region with size setting 
bydev.new(length=3,width=3)a plot region is produced, but the size is 
[2.281250, 5.322917], as detected by the de.size function. If I 
type:dev.new(length=10,width=10)I get a plot region of with the size of 
[7.614583, 5.322917]. It seems that the width of the new plot region cannot be 
set, and tt is always 5.322917. The length of the new plot region can be set, 
but it is always smaller that the values I set.What do I miss? What is the 
correct way of setting the dimension of the new plot region? I will be grateful 
to any help.Best regards,


The size of the device is not the size of the plot region. You need to take 
into account the margins. See ?par

Thank you, David.
I have read the par() document. Clearly the size of the plot region is smaller than or 
equal to the divice size. However, if I produce a graphic device with dev.new (length, 
width) or other functions, I find the largest  width of the new device is always 5.3 
inches whatever the values I set, and the length of it is alway smaller than what I set. 
Could you tell me how to produce a graphic divice with correct size that I set? I need 
this function because the graphic divice cannot accomendate all of the graph I make with 
some of plot tools such as ggtree. In ggtree plot, part of the tree tips label are 
invisible (https://www.dropbox.com/s/87gyusx7ay1xxu8/tree.pdf?dl=0) even I set 
"par(mar=rep(0,4))". So I think I must plot the tree on a larger graphic device.


- The argument to give dev.new is 'height', not 'length'.

- There are two margins, an inner margin (controlled by `mar`) and an outer 
margin (controlled by `oma`).

- The link to the dropbox image does demonstrate that you are having problems 
with your ggplot efforts, but it wasn't a link to any test data or the code 
used to produce that tree, so I'm not in a position to do any testing to offer 
refinements. From the red/bold highlighting in the HTML copy I got directly 
(that none of the other viewers are seeing)  I can see you are frustrated, but 
you need to take responsibility for writing a message that is being mangled. We 
readers of the this plain-text-only mailing list were seeing it.

- Please read the Posting Guide about the need to information about your 
specific computer setup and the value of a reproducible example. I suggest you 
should be learning to use the png or pdf devices. Read ?Devices and ?png. (The 
default units are not inches.).



Best regards.




  [[alternative HTML version deleted]]


- It appears that your second message was also sent as HTML. I do therefore ask 
(again) that you take the time to read the Posting Guide.

\/\/\/\/A message that appears in every message sent from Rhelp's list server 
\/\/\/\/\/\/\

PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

^^^

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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 -- To UNSUBSCRIBE and more, see
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] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-04 Thread David Winsemius

> On May 4, 2018, at 12:04 AM, sunyeping  wrote:
> 
> 
> --
> From:David Winsemius 
> Send Time:2018 May 4 (Fri) 13:25
> To:孙业平 
> Cc:R Help Mailing List 
> Subject:Re: [R] why the length and width of a plot region produced by the 
> dev.new() function cannot be correctly set?
> 
> 
> > On May 3, 2018, at 6:28 PM, sunyeping via R-help  
> > wrote:
> > 
> > When I check the size of the plot region usingdev.size("in")a new plot 
> > region is produced and in the Rconsole I get[1] 5.33 5.322917
> 
> Your test is all mangleed together. You failed in your duty to read the list 
> info and the Posting guide . NO HTML!
> 
> > If I mean to produce a plot region with size setting 
> > bydev.new(length=3,width=3)a plot region is produced, but the size is 
> > [2.281250, 5.322917], as detected by the de.size function. If I 
> > type:dev.new(length=10,width=10)I get a plot region of with the size of 
> > [7.614583, 5.322917]. It seems that the width of the new plot region cannot 
> > be set, and tt is always 5.322917. The length of the new plot region can be 
> > set, but it is always smaller that the values I set.What do I miss? What is 
> > the correct way of setting the dimension of the new plot region? I will be 
> > grateful to any help.Best regards,
> 
> The size of the device is not the size of the plot region. You need to take 
> into account the margins. See ?par
> 
> Thank you, David.
> I have read the par() document. Clearly the size of the plot region is 
> smaller than or equal to the divice size. However, if I produce a graphic 
> device with dev.new (length, width) or other functions, I find the largest  
> width of the new device is always 5.3 inches whatever the values I set, and 
> the length of it is alway smaller than what I set. Could you tell me how to 
> produce a graphic divice with correct size that I set? I need this function 
> because the graphic divice cannot accomendate all of the graph I make with 
> some of plot tools such as ggtree. In ggtree plot, part of the tree tips 
> label are invisible (https://www.dropbox.com/s/87gyusx7ay1xxu8/tree.pdf?dl=0) 
> even I set "par(mar=rep(0,4))". So I think I must plot the tree on a larger 
> graphic device.  

- The argument to give dev.new is 'height', not 'length'.

- There are two margins, an inner margin (controlled by `mar`) and an outer 
margin (controlled by `oma`). 

- The link to the dropbox image does demonstrate that you are having problems 
with your ggplot efforts, but it wasn't a link to any test data or the code 
used to produce that tree, so I'm not in a position to do any testing to offer 
refinements. From the red/bold highlighting in the HTML copy I got directly 
(that none of the other viewers are seeing)  I can see you are frustrated, but 
you need to take responsibility for writing a message that is being mangled. We 
readers of the this plain-text-only mailing list were seeing it. 

- Please read the Posting Guide about the need to information about your 
specific computer setup and the value of a reproducible example. I suggest you 
should be learning to use the png or pdf devices. Read ?Devices and ?png. (The 
default units are not inches.).


> Best regards. 
> 
> 
> > 
> >  [[alternative HTML version deleted]]

- It appears that your second message was also sent as HTML. I do therefore ask 
(again) that you take the time to read the Posting Guide.

\/\/\/\/A message that appears in every message sent from Rhelp's list server 
\/\/\/\/\/\/\
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
^^^

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-04 Thread Duncan Murdoch

On 04/05/2018 3:04 AM, sunyeping via R-help wrote:


--From:David Winsemius 
Send Time:2018 May 4 (Fri) 13:25To:孙业平 
Cc:R Help Mailing List Subject:Re: [R] 
why the length and width of a plot region produced by the dev.new() function cannot be correctly 
set?


  On May 3, 2018, at 6:28 PM, sunyeping via R-help  wrote:
  
  When I check the size of the plot region usingdev.size("in")a new plot region is produced and in the Rconsole I get[1] 5.33 5.322917


Your test is all mangleed together. You failed in your duty to read the list 
info and the Posting guide . NO HTML!


  If I mean to produce a plot region with size setting 
bydev.new(length=3,width=3)a plot region is produced, but the size is 
[2.281250, 5.322917], as detected by the de.size function. If I 
type:dev.new(length=10,width=10)I get a plot region of with the size of 
[7.614583, 5.322917]. It seems that the width of the new plot region cannot be 
set, and tt is always 5.322917. The length of the new plot region can be set, 
but it is always smaller that the values I set.What do I miss? What is the 
correct way of setting the dimension of the new plot region? I will be grateful 
to any help.Best regards,


The size of the device is not the size of the plot region. You need to take 
into account the margins. See ?par
Thank you, David.I have read the par() document. Clearly the size of the plot 
region is smaller than or equal to the divice size. However, if I produce a 
graphic device with dev.new (length, width) or other functions, I find the 
largest  width of the new device is always 5.3 inches whatever the values I 
set, and the length of it is alway smaller than what I set.


The length and width aren't the first and second parameters for any 
device, and length isn't a parameter at all.  Try


dev.new(height = 10, width = 10)

and you should get a bigger device if it will fit on your screen.  If it 
won't fit, then you might get a smaller one, and you'll need to choose a 
non-screen device such as png() or pdf() instead of the default device.


Duncan Murdoch

 Could you tell me how to produce a graphic divice with correct size 
that I set? I need this function because the graphic divice cannot 
accomendate all of the graph I make with some of plot tools such as 
ggtree. In ggtree plot, part of the tree tips label are invisible 
(https://www.dropbox.com/s/87gyusx7ay1xxu8/tree.pdf?dl=0) even I set 
"par(mar=rep(0,4))". So I think I must plot the tree on a larger graphic 
device.  Best regards.



  
   [[alternative HTML version deleted]]
  
  __

  R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
  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.


David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law





[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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 -- To UNSUBSCRIBE and more, see
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] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-04 Thread sunyeping via R-help

--From:David 
Winsemius Send Time:2018 May 4 (Fri) 13:25To:孙业平 
Cc:R Help Mailing List Subject:Re: 
[R] why the length and width of a plot region produced by the dev.new() 
function cannot be correctly set?

> On May 3, 2018, at 6:28 PM, sunyeping via R-help  wrote:
> 
> When I check the size of the plot region usingdev.size("in")a new plot region 
>is produced and in the Rconsole I get[1] 5.33 5.322917

Your test is all mangleed together. You failed in your duty to read the list 
info and the Posting guide . NO HTML!

> If I mean to produce a plot region with size setting 
>bydev.new(length=3,width=3)a plot region is produced, but the size is 
>[2.281250, 5.322917], as detected by the de.size function. If I 
>type:dev.new(length=10,width=10)I get a plot region of with the size of 
>[7.614583, 5.322917]. It seems that the width of the new plot region cannot be 
>set, and tt is always 5.322917. The length of the new plot region can be set, 
>but it is always smaller that the values I set.What do I miss? What is the 
>correct way of setting the dimension of the new plot region? I will be 
>grateful to any help.Best regards,

The size of the device is not the size of the plot region. You need to take 
into account the margins. See ?par
Thank you, David.I have read the par() document. Clearly the size of the plot 
region is smaller than or equal to the divice size. However, if I produce a 
graphic device with dev.new (length, width) or other functions, I find the 
largest  width of the new device is always 5.3 inches whatever the values I 
set, and the length of it is alway smaller than what I set. Could you tell me 
how to produce a graphic divice with correct size that I set? I need this 
function because the graphic divice cannot accomendate all of the graph I make 
with some of plot tools such as ggtree. In ggtree plot, part of the tree tips 
label are invisible (https://www.dropbox.com/s/87gyusx7ay1xxu8/tree.pdf?dl=0) 
even I set "par(mar=rep(0,4))". So I think I must plot the tree on a larger 
graphic device.  Best regards. 


> 
>  [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law





[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-03 Thread David Winsemius

> On May 3, 2018, at 6:28 PM, sunyeping via R-help  wrote:
> 
> When I check the size of the plot region usingdev.size("in")a new plot region 
> is produced and in the Rconsole I get[1] 5.33 5.322917

Your test is all mangleed together. You failed in your duty to read the list 
info and the Posting guide . NO HTML!

> If I mean to produce a plot region with size setting 
> bydev.new(length=3,width=3)a plot region is produced, but the size is 
> [2.281250, 5.322917], as detected by the de.size function. If I 
> type:dev.new(length=10,width=10)I get a plot region of with the size of 
> [7.614583, 5.322917]. It seems that the width of the new plot region cannot 
> be set, and tt is always 5.322917. The length of the new plot region can be 
> set, but it is always smaller that the values I set.What do I miss? What is 
> the correct way of setting the dimension of the new plot region? I will be 
> grateful to any help.Best regards,

The size of the device is not the size of the plot region. You need to take 
into account the margins. See ?par


> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] why the length and width of a plot region produced by the dev.new() function cannot be correctly set?

2018-05-03 Thread sunyeping via R-help
When I check the size of the plot region usingdev.size("in")a new plot region 
is produced and in the Rconsole I get[1] 5.33 5.322917If I mean to produce 
a plot region with size setting bydev.new(length=3,width=3)a plot region is 
produced, but the size is [2.281250, 5.322917], as detected by the de.size 
function. If I type:dev.new(length=10,width=10)I get a plot region of with the 
size of [7.614583, 5.322917]. It seems that the width of the new plot region 
cannot be set, and tt is always 5.322917. The length of the new plot region can 
be set, but it is always smaller that the values I set.What do I miss? What is 
the correct way of setting the dimension of the new plot region? I will be 
grateful to any help.Best regards,

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.