Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
word_cloud_est
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
keeleliin
word_cloud_est
Commits
262c6ac2
Commit
262c6ac2
authored
Apr 29, 2015
by
Andreas Mueller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update examples, docs.
parent
0808721e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
3 deletions
+7
-3
doc/index.rst
doc/index.rst
+5
-0
doc/references.rst
doc/references.rst
+1
-0
examples/a_new_hope.py
examples/a_new_hope.py
+1
-1
examples/alice.png
examples/alice.png
+0
-0
examples/colored.py
examples/colored.py
+0
-2
No files found.
doc/index.rst
View file @
262c6ac2
...
...
@@ -25,6 +25,11 @@
<img src="_images/masked_1.png" alt="...">
</a>
</div>
<div class="col-xs-3 col-md-3">
<a href="auto_examples/colored.html" class="thumbnail">
<img src="_images/colored_2.png" alt="...">
</a>
</div>
<div class="col-xs-3 col-md-3">
<a href="auto_examples/a_new_hope.html" class="thumbnail">
<img src="_images/a_new_hope_1.png" alt="...">
...
...
doc/references.rst
View file @
262c6ac2
...
...
@@ -16,6 +16,7 @@ All functionality is encapsulated in the WordCloud class.
:template: class.rst
WordCloud
ImageColorGenerator
:template: function.rst
...
...
examples/a_new_hope.py
View file @
262c6ac2
...
...
@@ -13,7 +13,7 @@ import random
from
wordcloud
import
WordCloud
,
STOPWORDS
def
grey_color_func
(
word
,
font_size
,
position
,
orientation
,
random_state
=
None
):
def
grey_color_func
(
word
,
font_size
,
position
,
orientation
,
random_state
=
None
,
**
kwargs
):
return
"hsl(0, 0%%, %d%%)"
%
random
.
randint
(
60
,
100
)
d
=
path
.
dirname
(
__file__
)
...
...
examples/alice.png
View replaced file @
0808721e
View file @
262c6ac2
159 KB
|
W:
|
H:
139 KB
|
W:
|
H:
2-up
Swipe
Onion skin
examples/colored.py
View file @
262c6ac2
...
...
@@ -31,13 +31,11 @@ image_colors = ImageColorGenerator(alice_coloring)
# show
plt
.
imshow
(
wc
)
plt
.
title
(
"original"
)
plt
.
axis
(
"off"
)
plt
.
figure
()
# recolor wordcloud and show
# we could also give color_func=image_colors directly in the constructor
plt
.
imshow
(
wc
.
recolor
(
color_func
=
image_colors
))
plt
.
title
(
"recolored"
)
plt
.
axis
(
"off"
)
plt
.
figure
()
plt
.
imshow
(
alice_coloring
,
cmap
=
plt
.
cm
.
gray
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment