문제

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