textplot2 {vulcan} | R Documentation |
This function is an extension of the 'textplot'
function from the
'wordcloud'
package, with the extra functionality of specifiying the
color of the points
textplot2( x, y, words, cex = 1, pch = 16, pointcolor = "#FFFFFF00", new = TRUE, show.lines = TRUE, ... )
x |
x coordinates |
y |
y coordinates |
words |
the text to plot |
cex |
font size |
pch |
pch parameter for the plotted points |
pointcolor |
a string specifying the color of the points (default #FFFFFF00) |
new |
should a new plot be created |
show.lines |
if true, then lines are plotted between x,y and the word, for those words not covering their x,y coordinates |
... |
Additional parameters to be passed to wordlayout and text. |
nothing
obj_names<-apply(expand.grid(LETTERS,LETTERS),1,paste,collapse='') a<-setNames(runif(26*26),obj_names) b<-setNames(rnorm(26*26),obj_names) plot(a,b,pch=20,col='grey') top<-names(sort(-a))[1:50] textplot2(a[top],b[top],words=top,new=FALSE,pointcolor='black')