Word Cloud

AI Revolution Cloud

Artificial intelligence and future tech terms with gradient effect

Output
AI Revolution Cloud
Python
import matplotlib.pyplot as plt
from wordcloud import WordCloud
import numpy as np

text = """Artificial Intelligence AI GPT ChatGPT Claude Gemini LLM
Large Language Model Transformer Attention Neural Network Deep Learning
Generative AI DALL-E Midjourney Stable Diffusion Image Generation
Prompt Engineering Fine Tuning RLHF Alignment Safety Ethics Bias
AGI Superintelligence Singularity Automation Future Robotics Humanoid
Computer Vision NLP Speech Recognition Sentiment Analysis Embedding
Vector Database RAG Retrieval Augmented Generation Agents Autonomous"""

def neon_rainbow(word, font_size, position, orientation, random_state=None, **kwargs):
    x_norm = position[0] / 1000
    colors = [
        (39, 211, 245),   # cyan
        (108, 245, 39),   # lime  
        (245, 176, 39),   # amber
        (245, 39, 108),   # coral
        (73, 39, 245),    # purple
    ]
    idx = int(x_norm * (len(colors) - 1))
    idx = min(idx, len(colors) - 2)
    t = (x_norm * (len(colors) - 1)) - idx
    r = int(colors[idx][0] * (1-t) + colors[idx+1][0] * t)
    g = int(colors[idx][1] * (1-t) + colors[idx+1][1] * t)
    b = int(colors[idx][2] * (1-t) + colors[idx+1][2] * t)
    return f'rgb({r},{g},{b})'

wordcloud = WordCloud(
    width=1200, height=600,
    background_color='#0a0a0f',
    color_func=neon_rainbow,
    max_words=100,
    max_font_size=150,
    min_font_size=8,
    relative_scaling=0.4,
    prefer_horizontal=0.8
).generate(text)

fig, ax = plt.subplots(figsize=(12, 6), facecolor='#0a0a0f')
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