Untitled

 avatar
unknown
plain_text
10 months ago
949 B
1
Indexable
import matplotlib.pyplot as plt
import numpy as np

# Creating the graph for Positive Externalities
# Private Benefit (PB) and Social Benefit (SB) curves

# Quantity range
quantity = np.linspace(0, 10, 100)

# Private benefit curve (linear for simplicity)
private_benefit = quantity

# Social benefit curve (linear and above the private benefit)
social_benefit = quantity + 3

# Plotting the curves
plt.figure(figsize=(10, 6))
plt.plot(quantity, private_benefit, label='Private Benefit', color='blue')
plt.plot(quantity, social_benefit, label='Social Benefit', color='green', linestyle='--')

# Shaded area representing the positive externalities
plt.fill_between(quantity, private_benefit, social_benefit, color='green', alpha=0.2)

# Labels and title
plt.title('Positive Externalities in Infant and Child Health Services')
plt.xlabel('Quantity of Health Services')
plt.ylabel('Benefit')
plt.legend()

# Display the graph
plt.grid(True)
plt.show()
Editor is loading...
Leave a Comment