Skip to content

plots

3 messages · Anna H. Pryor, Ko-Kang Kevin Wang, Pierre Kleiber

#
I have two separate questions.

The first is when I use xlab, the labels on my tic marks disappear.  Is there 
a way to make them reappear?  Also, is there a way to make my own labels for 
the tick marks?

My second question is, after I have spent a lot of time getting my plot to 
look just right, I want to save it to a file, but the only way I seem to know 
how to do it is to first use postscript() and then make the plot and then use 
dev.off().  I keep forgetting to do this, and I am wasting so much time.  Is 
there a way to save the plot after I have already made it?

Anna
#
Hi,
On Tue, 29 Apr 2003, Anna H. Pryor wrote:

            
Which version of R are you using on which platform?  Which plot were you 
trying to draw that cause this?  Can you give us some reproducible 
examples?  

The example seems to work fine:

plot(1:10, xlab = "A Label", ylab = "Another Label",
     axes = FALSE)
axis(1, at = seq(1, 10, by = 2),
     labels = c("a", "b", "c", "d", "e"))
axis(2, at = seq(1, 10, by = 2),
     labels = c("f", "g", "h", "i", "j"))

box()
You should be typing your R codes in a text editor (whatever platform 
you're working on).  Then copy and paste the codes into R.  This way you 
are not only able to make changes easily but also you have a good way to 
keep your history.

There are other graphics formats available, such as png(), pdf()...etc.
#
Anna H. Pryor wrote:
Once you have the plot looking just right on the screen, it is not 
necessary to replot in order to save it as a file.  Check out the 
functions dev.copy(), dev.copy2eps, and dev.print()

Pierre Kleiber