s-news
[Top] [All Lists]

Re: simple plot

To: Ping Zhang <pingzhang@avaya.com>
Subject: Re: simple plot
From: Sundar Dorai-Raj <sundar.dorai-raj@PDF.COM>
Date: Tue, 20 Jul 2004 10:42:24 -0500
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <1090337615.6572.24.camel@pzhang-pcl.research.avayalabs.com>
Organization: PDF Solutions, Inc.
References: <1090337615.6572.24.camel@pzhang-pcl.research.avayalabs.com>
Reply-to: sundar.dorai-raj@PDF.COM
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)


Ping Zhang wrote:
hi all,
I was trying to produce a simple plot with empty tick marks and labels, to be added later on with the axis() function. When I do

plot(x,y, lab=F)

however, I got a plot with the horizontal axis stretching out of bound in both directions. Anybody know why this happens, how to fix it, or alternative ways to accomplish this?
-Ping Zhang
Avaya Labs

Hi Ping,

I think you want:

plot(x, y, axes = FALSE)
axis(side = 1) # add x-axis
axis(side = 2) # add y-axis
box()          # add frame around plot area

If you look at ?par you will see why your original attempt was incorrect.

--sundar


<Prev in Thread] Current Thread [Next in Thread>