Untitled
import matplotlib.pyplot as plt import numpy as np # Define the range of x values (number of tables sold) x_values = np.arange(0, 300, 10) # Calculate Total Revenue (R) and Total Cost (C) for each value of x total_revenue = 500 * x_values total_cost = 30000 + 350 * x_values # Plot Total Revenue and Total Cost on the same graph plt.plot(x_values, total_revenue, label='Total Revenue ($)') plt.plot(x_values, total_cost, label='Total Cost ($)') plt.xlabel('Number of Tables Sold') plt.ylabel('Dollars') plt.title('Total Revenue and Total Cost') plt.legend() plt.grid(True) # Plot overhead cost (fixed cost) on the graph plt.scatter(0, 30000, color='red', label='Overhead Cost ($30,000)') plt.legend() # Show the graph plt.show()
Leave a Comment