in chartify/examples.py [0:0]
def chart_labels():
"""
Chart label examples
"""
import chartify
# Generate example data
data = chartify.examples.example_data()
apple_prices = data[data["fruit"] == "Apple"].groupby(["quantity"])["unit_price"].mean().reset_index()
# Plot the data with method chaining
(
chartify.Chart(blank_labels=True)
.plot.scatter(apple_prices, "quantity", "unit_price")
.set_title("Quantity decreases as price increases. <-- Use title for takeaway.")
.set_subtitle("Quantity vs. Price. <-- Use subtitle for data description.")
.axes.set_xaxis_label("Quantity per sale (Apples)")
.axes.set_yaxis_label("Price ($)")
.axes.set_yaxis_tick_format("$0.00")
.show(_OUTPUT_FORMAT)
)