You could use bquote. Something like this:
a<-c(1,2,3,4)
b<-c(1,2,3,4)
nTrials <- length(a)
for (trial in 1:nTrials) {
plot(x=a[1:trial], y=b[1:trial],
ylab=expression(paste("Apple"["P"])),
xlab=expression(paste("Banana"^"th")),
main=bquote(italic("i-")~.(trial)^"th"~"choi
On Apr 24, 2013, at 9:22 PM, Eva Günther wrote:
> Hi all,
>
> I have a problem in including my plot in a loop. Here is a simple example
> for one plot:
>
> # Plot simple graph with super- and subscript
> a<-c(1,2,3,4)
> b<-c(1,2,3,4)
>
> plot(x=a,y=b,
>ylab=expression(paste("Apple"["P"])),
2 matches
Mail list logo