Testing this out

import matplotlib.pyplot as plt

# Data from Kelley Blue Book (2024)
vehicle_types = ['Gas', 'Hybrid', 'EV']
prices = [25000, 32000, 43000]           # Average upfront price in USD
sales_volume = [3000000, 500000, 250000]   # Annual sales volume (units)
operating_savings = [0, 500, 1200]         # Estimated annual operating savings in USD

# Calculate bubble sizes (scaling factor for visualization)
# Here, we add a base size and scale the savings for better visual differentiation.
bubble_sizes = [50 + (saving / 10) for saving in operating_savings]

plt.figure(figsize=(8, 6))
scatter = plt.scatter(prices, sales_volume, s=bubble_sizes, alpha=0.6, edgecolor='k')

# Annotate each bubble with the corresponding vehicle type
for i, label in enumerate(vehicle_types):
    plt.annotate(label, (prices[i], sales_volume[i]),
                 fontsize=12, ha='center', va='center')

plt.xlabel('Average Upfront Price (USD)', fontsize=12)
plt.ylabel('Annual Sales Volume (Units)', fontsize=12)
plt.title('Price vs. Sales Volume Comparison for Gas, Hybrid, and EV Models', fontsize=14)
plt.grid(True)
plt.show()

What do you mean “testing this out”? Do you need help?