Comments (3)
fyi I'm just creating a version that includes a default font.
from word_cloud.
When creating the WordCloud object, you should give it a font_path
to an existing font on your system.
from word_cloud.
Thanks it will be easier.
I'm doing:
font_path = "/Library/Fonts/Times New Roman.ttf"
wordcloud = WordCloud(font_path=font_path, width = 1000, height = 500).generate('australian american english french russian')
plt.figure(figsize=(15,8))
plt.imshow(wordcloud)
plt.axis("off")
plt.show()
It's working fine
But maybe you should detect OS and use first a system font as default (not necessarily a font you add to word_cloud
package)
import os
os.name
Returns 'posix'
But
import platform
platform.system()
Returns 'Darwin'
And
platform.release()
Returns '14.3.0'
from word_cloud.
Related Issues (20)
- Could not build wheels for wordcloud - python 3.11.1 64 bit HOT 12
- how to get reproducible wordclouds (identical, except for image dimensions) HOT 2
- Error on installation HOT 1
- ValueError: Only supported for TrueType fonts HOT 33
- Fails to build with Python 3.12 HOT 2
- Custom and radom Font Size
- Unable to download wordcloud using python3.12 HOT 7
- MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 HOT 1
- MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 HOT 2
- Error in installing library wordcloud HOT 4
- ValueError: anchor not supported for multiline text HOT 3
- Maybe get rid of Cython HOT 4
- ValueError: Only supported for TrueType fonts on Databricks
- How to fix? : python setup.py egg_info did not run successfully. HOT 3
- Wordcloud not Support Multiple Languages in Once? Unicodes, Emoji, Glyphs all are not Works.
- Generating a wordcloud from a dictionary of terms with their frequencies HOT 1
- "AttributeError: 'ImageDraw' object has no attribute 'textbbox'" on Ubuntu 20.04 HOT 1
- test_cli_as_executable test failed on 1.9.3
- Works on Android Termux - quick tips
- Wordcloud returns an error when files exceed 15MB HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from word_cloud.