Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obtaining Left and Right Arrows As Plot Symbols in R

Tags:

symbols

plot

r

I have a data set that I would like to plot in R that contains a factor with categories of "left" and "right". I'd like to use plot symbols that somehow indicate direction, with a simple solution being triangles that point left and right. However, the standard symbol list in R only includes triangles that point up and down (pch = 2,6 or 24,25 for example, with a complete symbol list here). What's the most straightforward method of plotting triangles that point left and right?

Note: I've tried using < and > from the ascii set (pch = 60 and 62), although I'd like symbols that have better visibility because I'll eventually be using these figures on a projector. I'll fall back on these symbols if there isn't a better solution.

like image 895
Adam Bosen Avatar asked Dec 06 '25 17:12

Adam Bosen


1 Answers

plot(x=0, type="n")
text(1, .5, paste0("0.5", intToUtf8(9660)))
text(1, -.5, paste0("-0.5", intToUtf8(9650)))

enter image description here

Left: 9664, right: 9654

like image 190
lukeA Avatar answered Dec 09 '25 19:12

lukeA



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!