Is it possible to colorize parts of the title in a plot?
x = 1:10 y = 1:10 plot(x, y, main="title (slope=1)")
In this plot I'd like to change the color of slope=1 to red.
slope=1
This is a quite simple solution to your problem:
plot(x, y) title(expression("title (" * phantom("slope=1)") * ")"), col.main = "black") title(expression(phantom("title (") * "slope=1"), col.main = "red")
1.4m articles
1.4m replys
5 comments
57.0k users