s-news
[Top] [All Lists]

Subscript in graphic for pdf output

To: s-news@lists.biostat.wustl.edu
Subject: Subscript in graphic for pdf output
From: Tristan Lorino <tristan.lorino@lcpc.fr>
Date: Thu, 8 Nov 2007 10:39:30 +0100
Cc: Stuart Luppescu <s-luppescu@uchicago.edu>
Organization: LCPC
Reply-to: Tristan Lorino <tristan.lorino@lcpc.fr>
Hi,


I would like to put some subscript/superscript in a graphic and export
it into a pdf file.
Stuart Luppescu (thanks to him) suggested me to use expression():

> expression(hat(beta) == (X^t * X)^{-1} * X^t * y)

But it doesn't work with S+ v8 (or I don't know how to use it!). But I found 
some response
elements in Graphics Help from Insightful: here is a very simple
example...

> x <- seq(from = -2, to = 2, by = 0.1)
> y <- x^2
> guiPlot("Line", DataSetValues = data.frame(x,y))
> guiCreate("MainTitle",
Name = paste(guiGetGraphName(), "$1", sep=""),
Title = "x[2] versus x where x]i[ = -2, -1.9, ..., 2",
xPosition = "3.1", yPosition = "7")
> guiModify("XAxisTitle", Name = guiGetAxisTitleName(),
Title = "\\\"Symbol\"a")
> guiModify("YAxisTitle", Name = guiGetAxisTitleName(),
Title = "\\\"Symbol\"b")

Now I would like to export my graphic into a pdf file; usually I use

> ps.options (paper="A4", setfont=ps.setfont.latin1)
> pdf.graph("myplot.pdf", horizontal=TRUE, color=T)
> ...
> dev.off()

but if I enclose the first commands into the second commands, I obtain
an empty pdf...
How can I mix all these requests?

Thank you,
Tristan Lorino

-- 
Laboratoire Central des Ponts et Chaussées
[Division ESAR — Section AGR]
Route de Bouaye BP 4129
44341 Bouguenais Cedex
France
Tél 33 (0)2 40 84 56 18
Fax 33 (0)2 40 84 59 92


<Prev in Thread] Current Thread [Next in Thread>
  • Subscript in graphic for pdf output, Tristan Lorino <=