Skip to content

R-beta: Plot and scale

7 messages · Bill Venables, Bensmail, Bill Simpson +3 more

#
bensmail at rulfsw.fsw.leidenuniv.nl writes:
 > Hello everybody,
 > 
 > I am doing a plot and I would like to know which parameter I
 > have to use in order to get an equal scale for the axes x and
 > y: Means, if the intervals in the x-axis is 0,5,10,15....  I
 > would like to have the same scale for the y-axis.

Your question assumes there is such a parameter.  I don't believe
this is the case.  Brian Ripley has written a function "eqscplot"
for S-PLUS that does carefully arrange for the x- and y-scales to
be equal.  It is part of the MASS library, and I believe will
become available in CRAN when the copyright issues are finally
sorted (which may be now, but I am not quite sure).

 > Thank you so much for your help.
 > 
 > Halima from Leiden where the sun is shining.

Bill, from Australia, where it stopped shining about 4 hours
ago... :-)
#
Hello everybody,


I am doing a plot and I would like to know which parameter
I have to use in order to get an equal scale for the axes x and y:
Means, if the intervals in the x-axis is 0,5,10,15....
I would like  to have the same scale for the y-axis.

Thank you so much for your help.

Halima from Leiden where the sun is shining.

Holland

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
1 day later
#
While you are waiting for Bill Venables's suggestion to happen, maybe this
will work:
min,max 
This worked for me just now (same tick marks and labels on both axes).

Now if you are asking in addition how to ensure the two axes have the same
physical dimensions so the plot is actually square...
Well this should work
plot(...,pty="s")
but it doesn't due to a bug in R.  pty="s" does absolutely nothing so far
as I can tell.

My workaround is to force it to be square by fooling around with the
postscript(...,width=..., height=...) command.  I personally think it is a
design error in S-Plus/R for postscript() to modify the appearance of the
plot compared to how it looks in the Graphics window.
Bill Simpson

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Bill Simpson <wsimpson at uwinnipeg.ca> writes:
Mmm....no. Not unless you want all devices to give identical output.
Different devices have different characteristics, media sizes, physical
fonts, etc. postscript() and x11() are just two different device
drivers. 

However, having dev.print/print.plot departing (much) from what you
see on the screen *is* probably a bug (although that obviously assumes
that the hardcopy device is PostScript).
#
On 19 Mar 1998, Peter Dalgaard BSA wrote:

            
I knew people would disagree.
I have this opinion from years of working on the Mac, where the WYSIWYG
philosophy permeated everything.  The monitor and the printer were always
coordinated so the physical dimensions of a figure on the monitor and the
physical dimensions of the figure on the printer were identical.  (I
am including fonts of course) This was achieved despite the huge diffs in
monitor and laser printer resolution. I think this approach was also used
on NeXT.  And it is a wonderful time-saver for people who do graphics.
If you haven't experienced it, you don't know what you're missing.

Right now the only way to make figs look the way you want in R (X11) is
through trial and error (very time-consuming). (BTW using Mac R gives
figures with the lovely monitor=printer characteristics I've been talking
about, due to system software)

I know this lack of output device coordination was a design decision
(maybe not by S-Plus but at level of X-windows etc).  But it was a bad
decision.

Bill Simpson

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Bill Simpson <wsimpson at uwinnipeg.ca> writes:
Yes, it is even better on nextstep, now to be reincarnated in Apple's  
Rhapsody, which uses postscript to display both on screen and on paper (unlike  
the Mac), thus unifying the imaging.

Gerry Brush

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 19 Mar 1998, Bill Simpson wrote:

            
Very true.  Also, colors on NeXT were well matched between monitor
and output devices.
Well, you can take a couple measurements and deterine the pixel size
(and choose a mode that gives square pixels!).  Color is a much harder
problem unless you are willing to limit yourself to a small set of
colors.
Workstations and X-terminals generally have known pixel sizes (usually 72
or 100 dppi) and can be used to get consistent sizes (and have good color
control).  Using XFree86 I do miss the lack of control over these
factors, but it does give a lot of bang for the $ when I'm not fussing
over publication quality output. 

I do hope that these issues will eventually be addressed in XFree86.

--
George White <whiteg at mar.dfo-mpo.gc.ca> <aa056 at chebucto.ns.ca>  902.426.8509 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._