# Advanced demo: Customized AI visualization with annotations and subplots
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

def advanced_visualize(data):
    df = pd.DataFrame(data)
    fig, ax = plt.subplots(figsize=(10, 6))
    ax.plot(df['Time'], df['Signal'], label='AI Signal', color='blue', linewidth=2)
    ax.fill_between(df['Time'], df['Signal'], color='blue', alpha=0.1)
    ax.set_title('AI Signal Over Time', fontsize=16)
    ax.set_xlabel('Time (s)', fontsize=12)
    ax.set_ylabel('Signal Strength', fontsize=12)
    ax.legend(loc='upper right')
    ax.grid(True, linestyle='--')
    ax.annotate('Peak', xy=(5, np.max(df['Signal'])), xytext=(6, np.max(df['Signal'])-1), arrowprops=dict(facecolor='black', shrink=0.05))
    plt.show()

# Generate complex AI signal data
time = np.linspace(0, 10, 100)
signal = np.sin(time) + np.random.normal(0, 0.5, 100)
data = {"Time": time, "Signal": signal}
advanced_visualize(data)