
Waterfall Chart
Waterfall bar chart displaying the best percentage change in tumor size from baseline for each patient, a standard oncology clinical trial visualization.
Sample code / prompt
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(42)
categories = ['Revenue', 'COGS', 'Gross Profit', 'OpEx', 'Marketing', 'R&D', 'EBITDA', 'Tax', 'Net Income']
values = [500, -180, 320, -80, -45, -35, 160, -40, 120]
fig, ax = plt.subplots(figsize=(14, 7))
cumulative = 0
bottoms = []


