s-news
[Top] [All Lists]

Re: Still a problem with postcript() function

To: Kenneth Cabrera <krcabrer@epm.net.co>
Subject: Re: Still a problem with postcript() function
From: Sundar Dorai-Raj <sundar.dorai-raj@PDF.COM>
Date: Tue, 13 Apr 2004 09:10:52 -0500
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <407BCA15.2090704@epm.net.co>
Organization: PDF Solutions, Inc.
References: <407BCA15.2090704@epm.net.co>
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)


Kenneth Cabrera wrote:
Hi S-Plus users:

I still have a problem with postcript() function:

If I execute this lines I obtain the graphics "problem.eps" graphic.

postscript("problem.eps")
barplot(rpois(5,2),names=rep("A very long label with tildes mamá!",5),horiz=T)
dev.off()

As you see the "y" labels are cut.

But if I use the interactive mode I can arrange the problem, but I cannot
obtain the accents, like in "problem2.eps" file.

-- How can I modify the space for the "y" labels so the label will fit using postscript() function?
-- How can I put  colors using the postscript() function?

Again, thank you very much for your help.


1. You didn't give enough space for the ylabels.
2. See ?ps.options and use trellis.device(..., color = TRUE).

ps.options(paper = "a4", horizontal = TRUE,
           colors = ps.colors.rgb)
trellis.device(postscript, file = "problem.eps", color = TRUE)
par(mar = c(5, 15, 3, 1))
barplot(rpois(5, 2),
        names = rep("A very long label with tildes mamá!", 5),
        horiz = TRUE, col = 10)
dev.off()

This works on S-PLUS 6.2 for Windows.

HTH,
--sundar


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