Untitled
unknown
plain_text
a year ago
572 B
8
Indexable
from wordcloud import WordCloud
import matplotlib.pyplot as plt
# Sample text data
text = """
Python is an amazing programming language.
It is used for data analysis, web development, and machine learning.
Python's simplicity and readability make it a popular choice among developers.
"""
# Create a word cloud object
wordcloud = WordCloud(width=800, height=400, background_color='white').generate(text)
# Display the word cloud
plt.figure(figsize=(10, 5))
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis('off') # Hide the axis
plt.show()
Editor is loading...
Leave a Comment