Вопрос

Is there a way to insert symbol of arrow (other than simple " -> ") into a legend in R?

legend(locator(1), c("1 -> 2", ...))

Thank you.

Это было полезно?

Решение 2

Thank you for suggestions. So, one of the possible answers how to insert arrow (i.e. to show transitions from x to y) into the legend may look like this:

plot.new() # empty plot
legend("topright", c(expression(x[1] %->% y[1]), expression(x[2]%->%y[2])),  col=4, bty="n")

Другие советы

If you put this in without modification you will get an error, so why not post a complete example?

  legend(locator(1), c( expression(1 %->% 2), ...))

The appropriate place to look further is ?plotmath.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top