Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

would wordcloud2 create a 3D image? #21

Closed
earthcli opened this issue Apr 4, 2017 · 3 comments
Closed

would wordcloud2 create a 3D image? #21

earthcli opened this issue Apr 4, 2017 · 3 comments

Comments

@earthcli
Copy link

earthcli commented Apr 4, 2017

there is a link as follows:
http://www.ooopic.com/sheying/51040521.html

would you please give an example?

另外,我发现通过figPath指定自定义图形时有时候达不到预期效果,比如只填充了图片的轮廓(空心),或者图片的不规则形状被平滑(如带有不规则边缘的云朵输出后成为椭圆),不知道在图片选取上有什么技巧或注意事项?

@Lchiffon
Copy link
Owner

可以考虑保存成一个图片再打到一个球上....
保存图片用webshot, 打到球上用threejs
这个挺有意思的, 回头我搞搞看

@Lchiffon
Copy link
Owner

library(threejs)
library(wordcloud2)
library(htmlwidgets)
library(webshot)
hw = wordcloud2(demoFreqC,size = 4)
saveWidget(hw,"1.html",selfcontained = F)
webshot("1.html","1.jpeg",vwidth = 4000, vheight = 2000, delay =20)
earth <- "1.jpeg"
globejs(img=earth, bg="white")

image

恩, 这个可以作为一个代码糖了~

@Lchiffon
Copy link
Owner

以及, 空心问题是因为中间的颜色大概是白色, 代码还没那么自动会识别轮廓和位置全填充进去, 只会把颜色深的地方填充成词云...

边缘不好的话试试调大size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants