Word Cloud

Mental Health Wellness

Mental health and self-care vocabulary

Output
Mental Health Wellness
Python
import matplotlib.pyplot as plt
from wordcloud import WordCloud

text = """Mental Health Wellness Self Care Mindfulness Meditation Yoga
Therapy Counseling Psychology Psychiatry Anxiety Depression PTSD
Stress Management Burnout Work Life Balance Boundaries Rest Sleep
Gratitude Journaling Affirmations Positive Thinking Growth Mindset
Exercise Movement Nature Walk Fresh Air Sunshine Vitamin D Hydration
Community Support Group Friends Family Connection Social Belonging
Healing Recovery Progress Journey Resilience Strength Courage Hope"""

def calm_teal(word, font_size, position, orientation, random_state=None, **kwargs):
    colors = ['#0d9488', '#14b8a6', '#2dd4bf', '#5eead4', '#0f766e']
    return colors[hash(word) % len(colors)]

wordcloud = WordCloud(
    width=1200, height=600,
    background_color='#ffffff',
    color_func=calm_teal,
    max_words=80,
    max_font_size=130,
    min_font_size=10,
    relative_scaling=0.5
).generate(text)

fig, ax = plt.subplots(figsize=(12, 6), facecolor='#ffffff')
ax.imshow(wordcloud, interpolation='bilinear')
ax.axis('off')
plt.tight_layout(pad=0)
plt.show()
Library

Matplotlib

Category

Text Visualization

Did this help you?

Support PyLucid to keep it free & growing

Support