-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
staleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Description
- Right now the
ChartResponseonly provides the static image asresponse.get_base64_image() - This also has the last executed code as the following:
import pandas as pd
import matplotlib.pyplot as plt
sql_query = """
SELECT year, segment_profit
FROM table_7434d141_aeb4_4ed1_a716_7ecf8283b9dd
"""
df = execute_sql_query(sql_query)
plt.figure(figsize=(10, 6))
plt.bar(df['year'], df['segment_profit'], color='skyblue')
plt.xlabel('Year')
plt.ylabel('Segment Profit')
plt.title('Segment Profit by Year')
plt.xticks(df['year'])
plt.grid(axis='y', linestyle='--', alpha=0.7)
plt.tight_layout()
plot_filename = 'exports/charts/temp_chart.png'
plt.savefig(plot_filename)
result = {'type': 'plot', 'value': plot_filename}- Is there a way that we can preserve this
pltobject? Or at least get the co ordinates and labels.
Metadata
Metadata
Assignees
Labels
staleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed