Skip to content

Prime or dash in plotmath().

2 messages · Rolf Turner, Jerome Asselin

#
I've had to struggle a bit to get the prime/dash derivative notation
into a plotmath expression.  The use of

		expression(K'(t))

gives me a syntax error.  The best I've been able to come up with is

		expression(paste(K,"'",(t),sep=""))

Is this the ``accepted'' procedure, or is there a more direct route?

				cheers,

					Rolf Turner
					rolf at math.unb.ca
#
It looks like these four examples give all the same thing. You may pick 
the one that suits best in your case.

par(mfrow=c(2,2))
plot(1,1,xlab=expression(paste(K,"'",(t),sep="")))
plot(1,1,xlab=expression(paste(K,"'",(t))))
plot(1,1,xlab=expression(paste("K'(t)")))
plot(1,1,xlab=expression("K'(t)"))

HTH,
Jerome
On May 11, 2003 08:04 am, Rolf Turner wrote: