UPDATE:. After posting the problem in ggplot2 GitHub, the problem is that R does not allow tab characters in graphics devices.
I am trying to mark the edges of my plot using my own label. The text for my shortcuts contains both \ t and \ n. \ N characters are displayed correctly, but \ t creates squares.
tabLabeller <- function(variable, value) { return(paste0(as.character(value), 'Tab\tneeded Newline\nneeded')) } ggplot(mtcars, aes(x = cyl, y = mpg)) + geom_point() + facet_grid(~carb, labeller = tabLabeller)
Here's the chart:

Session Information:
> sessionInfo() R version 3.2.0 (2015-04-16) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.9.5 (Mavericks) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ggplot2_1.0.1 loaded via a namespace (and not attached): [1] labeling_0.3 MASS_7.3-40 colorspace_1.2-6 scales_0.2.4 magrittr_1.5 plyr_1.8.2 [7] tools_3.2.0 gtable_0.1.2 reshape2_1.4.1 Rcpp_0.11.5 stringi_0.4-1 grid_3.2.0 [13] stringr_1.0.0 digest_0.6.8 proto_0.3-10 munsell_0.4.2
r ggplot2
Lindsay vass
source share