Untitled
unknown
plain_text
7 months ago
1.7 kB
4
Indexable
import matplotlib.pyplot as plt
import pandas as pd
# Create the data for the schedule
data = [
["Week", "Day", "Wash Type"],
["1", "Monday", "Body Wash"],
["1", "Tuesday", "Body Wash"],
["1", "Wednesday", "Body Wash"],
["1", "Friday", "Interior & Exterior Wash"],
["2", "Monday", "Body Wash"],
["2", "Tuesday", "Body Wash"],
["2", "Wednesday", "Body Wash"],
["2", "Friday", "Interior & Exterior Wash"],
["3", "Monday", "Body Wash"],
["3", "Tuesday", "Body Wash"],
["3", "Wednesday", "Body Wash"],
["3", "Friday", "Interior & Exterior Wash"],
["4", "Monday", "Body Wash"],
["4", "Tuesday", "Body Wash"],
["4", "Friday", "Interior & Exterior Wash"]
]
# Create a DataFrame
df = pd.DataFrame(data[1:], columns=data[0])
# Create a figure and axis
fig, ax = plt.subplots(figsize=(8, 6))
ax.axis('tight')
ax.axis('off')
# Create a table and add it to the plot
table = ax.table(cellText=df.values, colLabels=df.columns, cellLoc='center', loc='center')
table.auto_set_font_size(False)
table.set_fontsize(12)
table.scale(1.2, 1.2)
# Save the image
plt.savefig("car_wash_schedule.png", bbox_inches='tight')
plt.show()
]Editor is loading...
Leave a Comment