Dataset Viewer
Auto-converted to Parquet Duplicate
instruction
stringclasses
13 values
input
stringlengths
39
391
output
stringlengths
1
386
task
stringclasses
7 values
Write Python matplotlib code for a line chart using the data below.
Chart type: line - EU: 178 - Oceania: 194 - Africa: 144 - NA: 27
import matplotlib.pyplot as plt labels = ["EU", "Oceania", "Africa", "NA"] values = [178, 194, 144, 27] plt.plot(labels, values, marker='o') plt.title('Stock Price') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
chart_to_code
Write Python matplotlib code for a line chart using the data below.
Chart type: line - Apr: 11 - Feb: 148 - May: 55 - Jun: 188
import matplotlib.pyplot as plt labels = ["Apr", "Feb", "May", "Jun"] values = [11, 148, 55, 188] plt.plot(labels, values, marker='o') plt.title('Stock Price') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Oceania: 60 - NA: 200 - EU: 91 - LATAM: 31 - MENA: 28 - APAC: 102 - Africa: 29 Question: Which category has the first highest value?
NA
chart_qa
Write Python matplotlib code for a pie chart using the data below.
Chart type: pie - Jul: 16 - Jan: 174 - May: 63 - Mar: 79 - Jun: 25 - Apr: 64 - Aug: 30 - Feb: 102
import matplotlib.pyplot as plt labels = ["Jul", "Jan", "May", "Mar", "Jun", "Apr", "Aug", "Feb"] values = [16, 174, 63, 79, 25, 64, 30, 102] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Device Mix') plt.show()
chart_to_code
Write Python matplotlib code for a scatter chart using the data below.
Chart type: scatter - APAC: 167 - EU: 48 - Oceania: 141 - NA: 191 - MENA: 67
import matplotlib.pyplot as plt labels = ["APAC", "EU", "Oceania", "NA", "MENA"] values = [167, 48, 141, 191, 67] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Price vs Rating') plt.xlabel('X') plt.ylabel('Y') plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Camera: 107 - Drone: 73 - Phone: 21 - Laptop: 59 - Console: 150 - Speaker: 188 Question: What is the percentage change from Laptop to Speaker?
218.6%
chart_qa
The following matplotlib code has a bug. Return the corrected code.
import matplotlib.pyplot as plt labels = ["Watch", "Camera", "Speaker", "Drone", "Tablet", "Console"] values = [154, 114, 154, 107, 97, 61, 0] plt.bar(labels, values, color='steelblue') plt.title('Revenue by Product') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
import matplotlib.pyplot as plt labels = ["Watch", "Camera", "Speaker", "Drone", "Tablet", "Console"] values = [154, 114, 154, 107, 97, 61] plt.bar(labels, values, color='steelblue') plt.title('Revenue by Product') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
fix_code
Write Python matplotlib code for a line chart using the data below.
Chart type: line - Mar: 157 - Jun: 21 - Feb: 103 - Apr: 102
import matplotlib.pyplot as plt labels = ["Mar", "Jun", "Feb", "Apr"] values = [157, 21, 103, 102] plt.plot(labels, values, marker='o') plt.title('Stock Price') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
chart_to_code
Write Python matplotlib code for a scatter chart using the data below.
Chart type: scatter - Feb: 45 - Jun: 121 - May: 5 - Mar: 189 - Jul: 189 - Jan: 72 - Aug: 133 - Apr: 200
import matplotlib.pyplot as plt labels = ["Feb", "Jun", "May", "Mar", "Jul", "Jan", "Aug", "Apr"] values = [45, 121, 5, 189, 189, 72, 133, 200] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Price vs Rating') plt.xlabel('X') plt.ylabel('Y') plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Tablet: 87 - Console: 130 - Laptop: 9 - Speaker: 33 - Phone: 97 - Drone: 83 Question: What is the ratio of Phone to Tablet?
1.11
chart_qa
Write Python matplotlib code for a line chart using the data below.
Chart type: line - Mar: 59 - Feb: 143 - Jun: 198 - Apr: 191 - Jul: 181 - May: 56 - Aug: 187
import matplotlib.pyplot as plt labels = ["Mar", "Feb", "Jun", "Apr", "Jul", "May", "Aug"] values = [59, 143, 198, 191, 181, 56, 187] plt.plot(labels, values, marker='o') plt.title('Daily Active Users') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Beta: 155 - Theta: 61 - Eta: 6 - Alpha: 23 - Gamma: 186 - Epsilon: 166 - Delta: 20 Question: What is the minimum value and which category has it?
6 (Eta)
chart_qa
Write Python matplotlib code for a scatter chart using the data below.
Chart type: scatter - Speaker: 143 - Camera: 38 - Watch: 190 - Laptop: 151
import matplotlib.pyplot as plt labels = ["Speaker", "Camera", "Watch", "Laptop"] values = [143, 38, 190, 151] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Stress vs Performance') plt.xlabel('X') plt.ylabel('Y') plt.show()
chart_to_code
Write Python matplotlib code for a bar chart using the data below.
Chart type: bar - Delta: 124 - Alpha: 191 - Eta: 18 - Theta: 177 - Gamma: 172 - Beta: 170 - Epsilon: 30
import matplotlib.pyplot as plt labels = ["Delta", "Alpha", "Eta", "Theta", "Gamma", "Beta", "Epsilon"] values = [124, 191, 18, 177, 172, 170, 30] plt.bar(labels, values, color='steelblue') plt.title('Sales by Region') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Watch: 40 - Laptop: 113 - Speaker: 51 - Console: 76 Question: What is the sum of all values?
280
chart_qa
Answer the question using the chart data.
Data: - Jan: 129 - Jun: 128 - May: 59 - Aug: 107 - Jul: 20 - Apr: 47 - Mar: 102 - Feb: 5 Question: Do Jul and Aug together make up more than half the total?
No
chart_qa
Write Python matplotlib code for a pie chart using the data below.
Chart type: pie - Speaker: 196 - Laptop: 85 - Phone: 19 - Console: 17 - Camera: 154
import matplotlib.pyplot as plt labels = ["Speaker", "Laptop", "Phone", "Console", "Camera"] values = [196, 85, 19, 17, 154] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Channel Distribution') plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Mar: 177 - Jan: 65 - May: 108 - Jul: 35 Question: What is the minimum value and which category has it?
35 (Jul)
chart_qa
Write Python matplotlib code for a line chart using the data below.
Chart type: line - APAC: 176 - EU: 170 - Oceania: 81 - Africa: 122 - LATAM: 85 - MENA: 197 - NA: 23
import matplotlib.pyplot as plt labels = ["APAC", "EU", "Oceania", "Africa", "LATAM", "MENA", "NA"] values = [176, 170, 81, 122, 85, 197, 23] plt.plot(labels, values, marker='o') plt.title('Monthly Sales') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
chart_to_code
The following matplotlib code has a bug. Return the corrected code.
import matplotlib.pyplot as plt labels = ["Speaker", "Laptop", "Tablet", "Phone"] values = ["67", "99", "77", "45"] plt.plot(labels, values, marker='o') plt.title('Temperature Trend') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
import matplotlib.pyplot as plt labels = ["Speaker", "Laptop", "Tablet", "Phone"] values = [67, 99, 77, 45] plt.plot(labels, values, marker='o') plt.title('Temperature Trend') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
fix_code
Answer the question using the chart data.
Data: - Alpha: 32 - Zeta: 195 - Epsilon: 146 - Gamma: 44 - Theta: 74 - Delta: 77 - Beta: 159 - Eta: 58 Question: Which category has the third highest value?
Epsilon
chart_qa
The following matplotlib code has a bug. Return the corrected code.
import matplotlib.pyplot as plt labels = ["Feb", "Jun", "Apr", "Mar", "Jan", "Jul"] values = [90, 38, 168, 72, 46, 194, 0] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Channel Distribution') plt.show()
import matplotlib.pyplot as plt labels = ["Feb", "Jun", "Apr", "Mar", "Jan", "Jul"] values = [90, 38, 168, 72, 46, 194] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Channel Distribution') plt.show()
fix_code
Answer the question using the chart data.
Data: - Mar: 154 - May: 146 - Jan: 42 - Aug: 115 Question: How many categories have values above the average?
3
chart_qa
Answer the question using the chart data.
Data: - EU: 95 - Africa: 148 - Oceania: 109 - NA: 163 Question: What is the range of the values?
68
chart_qa
Answer the question using the chart data.
Data: - Mar: 184 - Jun: 32 - Aug: 102 - Apr: 14 - Feb: 125 - May: 61 - Jan: 56 Question: How many categories have values above the average?
3
chart_qa
Answer the question using the chart data.
Data: - Apr: 76 - Aug: 94 - Mar: 169 - Jun: 135 - Jan: 107 Question: What is the maximum value and which category has it?
169 (Mar)
chart_qa
The following matplotlib code has a bug. Return the corrected code.
labels = ["Speaker", "Phone", "Drone", "Console", "Watch", "Laptop"] values = [191, 85, 116, 160, 135, 34] plt.plot(labels, values, marker='o') plt.title('Temperature Trend') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
import matplotlib.pyplot as plt labels = ["Speaker", "Phone", "Drone", "Console", "Watch", "Laptop"] values = [191, 85, 116, 160, 135, 34] plt.plot(labels, values, marker='o') plt.title('Temperature Trend') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
fix_code
Describe what the following matplotlib code will plot, including key statistics.
import matplotlib.pyplot as plt labels = ["Alpha", "Epsilon", "Eta", "Beta"] values = [98, 115, 22, 175] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Age vs Income') plt.xlabel('X') plt.ylabel('Y') plt.show()
This code creates a scatter chart titled 'Age vs Income'. It has 4 categories, an average of 102.5, a median of 106.5, a maximum of 175 (Beta), a minimum of 22 (Eta), and an overall mixed trend.
code_to_desc
Answer the question using the chart data.
Data: - MENA: 108 - APAC: 183 - LATAM: 80 - Africa: 146 Question: What percentage of the maximum value is Africa?
79.8%
chart_qa
The following matplotlib code has a bug. Return the corrected code.
import matplotlib.pyplot as plt labels = ["Epsilon", "Delta", "Theta", "Alpha", "Gamma", "Beta", "Zeta", "Eta"] values = [153, 160, 172, 87, 124, 118, 118, 177, 0] plt.bar(labels, values, color='steelblue') plt.title('Revenue by Product') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layo...
import matplotlib.pyplot as plt labels = ["Epsilon", "Delta", "Theta", "Alpha", "Gamma", "Beta", "Zeta", "Eta"] values = [153, 160, 172, 87, 124, 118, 118, 177] plt.bar(labels, values, color='steelblue') plt.title('Revenue by Product') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout(...
fix_code
Answer the question using the chart data.
Data: - MENA: 28 - Africa: 197 - Oceania: 65 - APAC: 177 Question: What percentage of the total does Africa represent?
42.2%
chart_qa
Write Python matplotlib code for a line chart using the data below.
Chart type: line - Console: 111 - Speaker: 166 - Phone: 152 - Watch: 54
import matplotlib.pyplot as plt labels = ["Console", "Speaker", "Phone", "Watch"] values = [111, 166, 152, 54] plt.plot(labels, values, marker='o') plt.title('Temperature Trend') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Phone: 50 - Drone: 183 - Console: 137 - Watch: 123 - Laptop: 17 Question: What is the average value across all categories?
102
chart_qa
Answer the question using the chart data.
Data: - Zeta: 145 - Eta: 119 - Delta: 45 - Epsilon: 195 - Theta: 126 Question: What is the ratio of Delta to Epsilon?
0.23
chart_qa
Modify the following matplotlib code according to the request.
Add a dotted grid to the plot. import matplotlib.pyplot as plt labels = ["Beta", "Zeta", "Gamma", "Theta", "Eta", "Epsilon"] values = [86, 143, 25, 40, 43, 64] plt.bar(labels, values, color='steelblue') plt.title('Counts by Category') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout(...
import matplotlib.pyplot as plt labels = ["Beta", "Zeta", "Gamma", "Theta", "Eta", "Epsilon"] values = [86, 143, 25, 40, 43, 64] plt.bar(labels, values, color='steelblue') plt.title('Counts by Category') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.grid(True, color='gray', l...
style_transfer
Convert the CSV data into a Python matplotlib bar chart.
category,value Eta,111 Gamma,20 Epsilon,57 Delta,112
import matplotlib.pyplot as plt labels = ["Eta", "Gamma", "Epsilon", "Delta"] values = [111, 20, 57, 112] plt.bar(labels, values, color='steelblue') plt.title('Counts by Category') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
data_to_code
Modify the following matplotlib code according to the request.
Add a dotted grid to the plot. import matplotlib.pyplot as plt labels = ["Console", "Phone", "Tablet", "Camera", "Watch", "Laptop", "Drone", "Speaker"] values = [61, 74, 116, 129, 12, 104, 91, 176] plt.plot(labels, values, marker='o') plt.title('Temperature Trend') plt.xlabel('Period') plt.ylabel('Value') plt.grid(Tru...
import matplotlib.pyplot as plt labels = ["Console", "Phone", "Tablet", "Camera", "Watch", "Laptop", "Drone", "Speaker"] values = [61, 74, 116, 129, 12, 104, 91, 176] plt.plot(labels, values, marker='o') plt.title('Temperature Trend') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) pl...
style_transfer
Answer the question using the chart data.
Data: - Jul: 169 - May: 114 - Aug: 39 - Jan: 123 - Jun: 51 Question: If Aug's value doubled, what would the new total be?
535
chart_qa
Convert the CSV data into a Python matplotlib bar chart.
category,value APAC,9 LATAM,196 Oceania,143 Africa,18 EU,94 NA,62 MENA,171
import matplotlib.pyplot as plt labels = ["APAC", "LATAM", "Oceania", "Africa", "EU", "NA", "MENA"] values = [9, 196, 143, 18, 94, 62, 171] plt.bar(labels, values, color='steelblue') plt.title('Sales by Region') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
data_to_code
The following matplotlib code has a bug. Return the corrected code.
labels = ["Watch", "Drone", "Phone", "Speaker"] values = [44, 66, 37, 126] plt.plot(labels, values, marker='o') plt.title('Monthly Sales') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
import matplotlib.pyplot as plt labels = ["Watch", "Drone", "Phone", "Speaker"] values = [44, 66, 37, 126] plt.plot(labels, values, marker='o') plt.title('Monthly Sales') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
fix_code
Write Python matplotlib code for a pie chart using the data below.
Chart type: pie - EU: 32 - MENA: 153 - Africa: 11 - NA: 84 - LATAM: 152 - Oceania: 178
import matplotlib.pyplot as plt labels = ["EU", "MENA", "Africa", "NA", "LATAM", "Oceania"] values = [32, 153, 11, 84, 152, 178] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Channel Distribution') plt.show()
chart_to_code
Write Python matplotlib code for a bar chart using the data below.
Chart type: bar - Laptop: 35 - Camera: 149 - Tablet: 15 - Speaker: 93
import matplotlib.pyplot as plt labels = ["Laptop", "Camera", "Tablet", "Speaker"] values = [35, 149, 15, 93] plt.bar(labels, values, color='steelblue') plt.title('Units Sold') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
chart_to_code
Write Python matplotlib code for a scatter chart using the data below.
Chart type: scatter - NA: 115 - LATAM: 97 - Africa: 167 - Oceania: 122
import matplotlib.pyplot as plt labels = ["NA", "LATAM", "Africa", "Oceania"] values = [115, 97, 167, 122] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Price vs Rating') plt.xlabel('X') plt.ylabel('Y') plt.show()
chart_to_code
Modify the following matplotlib code according to the request.
Change the color of the chart. import matplotlib.pyplot as plt labels = ["Epsilon", "Theta", "Eta", "Delta", "Zeta", "Beta", "Gamma", "Alpha"] values = [67, 27, 76, 120, 67, 197, 123, 150] plt.bar(labels, values, color='steelblue') plt.title('Units Sold') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=...
import matplotlib.pyplot as plt labels = ["Epsilon", "Theta", "Eta", "Delta", "Zeta", "Beta", "Gamma", "Alpha"] values = [67, 27, 76, 120, 67, 197, 123, 150] plt.bar(labels, values, color='seagreen') plt.title('Units Sold') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
style_transfer
Answer the question using the chart data.
Data: - EU: 157 - LATAM: 184 - Oceania: 75 - APAC: 147 - MENA: 7 - Africa: 137 - NA: 53 Question: What percentage of the maximum value is APAC?
79.9%
chart_qa
The following matplotlib code has a bug. Return the corrected code.
import matplotlib.pyplot as plt labels = ["Theta", "Eta", "Alpha", "Zeta", "Gamma", "Epsilon", "Beta"] values = [182, 67, 83, 174, 153, 99, 126] plt.bar(labels, values, color='steelblue') plt.show() plt.title('Units Sold') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout()
import matplotlib.pyplot as plt labels = ["Theta", "Eta", "Alpha", "Zeta", "Gamma", "Epsilon", "Beta"] values = [182, 67, 83, 174, 153, 99, 126] plt.bar(labels, values, color='steelblue') plt.title('Units Sold') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
fix_code
Answer the question using the chart data.
Data: - Camera: 189 - Console: 54 - Watch: 85 - Tablet: 35 - Speaker: 195 - Laptop: 142 - Phone: 200 - Drone: 181 Question: What percentage of the total does Drone represent?
16.7%
chart_qa
Modify the following matplotlib code according to the request.
Add a dotted grid to the plot. import matplotlib.pyplot as plt labels = ["Epsilon", "Alpha", "Beta", "Gamma", "Zeta", "Delta", "Eta", "Theta"] values = [8, 186, 141, 37, 75, 16, 18, 146] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Age vs Income') plt.xlabel('X') plt.ylabel('Y') plt.sh...
import matplotlib.pyplot as plt labels = ["Epsilon", "Alpha", "Beta", "Gamma", "Zeta", "Delta", "Eta", "Theta"] values = [8, 186, 141, 37, 75, 16, 18, 146] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Age vs Income') plt.xlabel('X') plt.ylabel('Y') plt.grid(True, color='gray', linestyle...
style_transfer
Answer the question using the chart data.
Data: - May: 92 - Apr: 52 - Jul: 18 - Jun: 69 Question: What is the sum of all values?
231
chart_qa
Convert the CSV data into a Python matplotlib pie chart.
category,value Jan,35 Feb,147 Jul,200 May,111 Mar,160 Aug,157 Apr,163
import matplotlib.pyplot as plt labels = ["Jan", "Feb", "Jul", "May", "Mar", "Aug", "Apr"] values = [35, 147, 200, 111, 160, 157, 163] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Budget Allocation') plt.show()
data_to_code
Describe what the following matplotlib code will plot, including key statistics.
import matplotlib.pyplot as plt labels = ["Epsilon", "Eta", "Theta", "Delta", "Gamma", "Zeta", "Alpha"] values = [161, 194, 30, 200, 58, 165, 59] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Device Mix') plt.show()
This code creates a pie chart titled 'Device Mix'. It has 7 categories, an average of 123.9, a median of 161, a maximum of 200 (Delta), a minimum of 30 (Theta), and an overall mixed trend.
code_to_desc
Answer the question using the chart data.
Data: - Tablet: 109 - Speaker: 120 - Phone: 181 - Laptop: 157 - Camera: 125 Question: What is the ratio of Phone to Camera?
1.45
chart_qa
Answer the question using the chart data.
Data: - Speaker: 174 - Drone: 55 - Camera: 113 - Console: 34 Question: What is the median value?
84.0
chart_qa
Answer the question using the chart data.
Data: - Jan: 117 - Feb: 36 - Mar: 124 - May: 181 - Jun: 82 Question: If Jun were 146 instead of 82, what would the new total be?
604
chart_qa
Describe what the following matplotlib code will plot, including key statistics.
import matplotlib.pyplot as plt labels = ["Jul", "Jun", "Mar", "May"] values = [69, 11, 28, 63] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Category Share') plt.show()
This code creates a pie chart titled 'Category Share'. It has 4 categories, an average of 42.8, a median of 45.5, a maximum of 69 (Jul), a minimum of 11 (Jun), and an overall mixed trend.
code_to_desc
Write Python matplotlib code for a line chart using the data below.
Chart type: line - Mar: 154 - Apr: 116 - May: 167 - Jul: 130 - Aug: 28 - Jan: 125
import matplotlib.pyplot as plt labels = ["Mar", "Apr", "May", "Jul", "Aug", "Jan"] values = [154, 116, 167, 130, 28, 125] plt.plot(labels, values, marker='o') plt.title('Daily Active Users') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Mar: 107 - Aug: 199 - Apr: 145 - Jun: 14 - Jul: 121 - May: 27 Question: Describe the overall trend of the values.
Mixed
chart_qa
Answer the question using the chart data.
Data: - Aug: 165 - Apr: 118 - Jan: 199 - Feb: 18 - Mar: 57 - Jul: 73 - May: 145 Question: Do Jul and Feb together make up more than half the total?
No
chart_qa
Write Python matplotlib code for a line chart using the data below.
Chart type: line - Tablet: 146 - Console: 109 - Speaker: 28 - Phone: 62
import matplotlib.pyplot as plt labels = ["Tablet", "Console", "Speaker", "Phone"] values = [146, 109, 28, 62] plt.plot(labels, values, marker='o') plt.title('Monthly Sales') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
chart_to_code
Which matplotlib chart type is most appropriate for the data below?
- Epsilon: 128 - Theta: 125 - Zeta: 67 - Gamma: 121 - Delta: 146
line — A line chart is best for showing trends across ordered categories.
chart_choice
The following matplotlib code has a bug. Return the corrected code.
import matplotlib.pyplot as plt labels = ["Gamma", "Eta", "Alpha", "Theta", "Delta", "Beta", "Epsilon", "Zeta"] values = [77, 190, 81, 155, 153, 173, 130, 43, 0] plt.bar(labels, values, color='steelblue') plt.title('Counts by Category') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout...
import matplotlib.pyplot as plt labels = ["Gamma", "Eta", "Alpha", "Theta", "Delta", "Beta", "Epsilon", "Zeta"] values = [77, 190, 81, 155, 153, 173, 130, 43] plt.bar(labels, values, color='steelblue') plt.title('Counts by Category') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() ...
fix_code
Which matplotlib chart type is most appropriate for the data below?
- Theta: 110 - Gamma: 16 - Beta: 86 - Zeta: 195 - Delta: 126 - Alpha: 185
scatter — A scatter chart is best for showing the relationship between two numerical variables.
chart_choice
Answer the question using the chart data.
Data: - Mar: 139 - May: 121 - Jul: 8 - Aug: 189 - Jan: 41 - Feb: 109 - Apr: 172 Question: What is the percentage change from Apr to Jul?
-95.3%
chart_qa
Write Python matplotlib code for a scatter chart using the data below.
Chart type: scatter - Eta: 163 - Zeta: 22 - Alpha: 65 - Gamma: 166 - Delta: 180 - Beta: 78 - Epsilon: 63 - Theta: 196
import matplotlib.pyplot as plt labels = ["Eta", "Zeta", "Alpha", "Gamma", "Delta", "Beta", "Epsilon", "Theta"] values = [163, 22, 65, 166, 180, 78, 63, 196] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Height vs Weight') plt.xlabel('X') plt.ylabel('Y') plt.show()
chart_to_code
Which matplotlib chart type is most appropriate for the data below?
- Gamma: 16 - Zeta: 88 - Theta: 19 - Alpha: 80
line — A line chart is best for showing trends across ordered categories.
chart_choice
Write Python matplotlib code for a pie chart using the data below.
Chart type: pie - Drone: 49 - Speaker: 25 - Camera: 161 - Laptop: 102 - Console: 163
import matplotlib.pyplot as plt labels = ["Drone", "Speaker", "Camera", "Laptop", "Console"] values = [49, 25, 161, 102, 163] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Budget Allocation') plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Epsilon: 78 - Delta: 178 - Gamma: 144 - Alpha: 45 - Eta: 23 Question: How many categories have values above the average?
2
chart_qa
Answer the question using the chart data.
Data: - Epsilon: 102 - Beta: 151 - Delta: 96 - Zeta: 152 - Alpha: 80 - Theta: 184 Question: If Delta's value doubled, what would the new total be?
861
chart_qa
Describe what the following matplotlib code will plot, including key statistics.
import matplotlib.pyplot as plt labels = ["Alpha", "Epsilon", "Zeta", "Delta", "Gamma", "Theta", "Beta", "Eta"] values = [167, 53, 163, 69, 178, 198, 189, 173] plt.plot(labels, values, marker='o') plt.title('Weekly Traffic') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
This code creates a line chart titled 'Weekly Traffic'. It has 8 categories, an average of 148.8, a median of 170.0, a maximum of 198 (Theta), a minimum of 53 (Epsilon), and an overall mixed trend.
code_to_desc
Convert the CSV data into a Python matplotlib line chart.
category,value Oceania,192 LATAM,38 NA,28 APAC,80
import matplotlib.pyplot as plt labels = ["Oceania", "LATAM", "NA", "APAC"] values = [192, 38, 28, 80] plt.plot(labels, values, marker='o') plt.title('Daily Active Users') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
data_to_code
Answer the question using the chart data.
Data: - Tablet: 47 - Drone: 70 - Speaker: 128 - Console: 80 - Camera: 196 Question: Do Tablet and Drone together make up more than half the total?
No
chart_qa
Answer the question using the chart data.
Data: - NA: 99 - LATAM: 177 - Oceania: 196 - APAC: 177 - Africa: 72 - MENA: 154 - EU: 102 Question: What is the ratio of APAC to NA?
1.79
chart_qa
Write Python matplotlib code for a scatter chart using the data below.
Chart type: scatter - Feb: 14 - Jun: 82 - Apr: 131 - Mar: 34 - Jul: 29 - Jan: 65 - May: 142 - Aug: 39
import matplotlib.pyplot as plt labels = ["Feb", "Jun", "Apr", "Mar", "Jul", "Jan", "May", "Aug"] values = [14, 82, 131, 34, 29, 65, 142, 39] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Ads vs Clicks') plt.xlabel('X') plt.ylabel('Y') plt.show()
chart_to_code
Modify the following matplotlib code according to the request.
Rotate the x-axis labels by 90 degrees. import matplotlib.pyplot as plt labels = ["Tablet", "Watch", "Camera", "Phone", "Drone", "Console", "Laptop", "Speaker"] values = [13, 181, 99, 60, 118, 118, 65, 97] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Height vs Weight') plt.xlabel('X') ...
import matplotlib.pyplot as plt labels = ["Tablet", "Watch", "Camera", "Phone", "Drone", "Console", "Laptop", "Speaker"] values = [13, 181, 99, 60, 118, 118, 65, 97] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Height vs Weight') plt.xlabel('X') plt.ylabel('Y') plt.xticks(rotation=90) p...
style_transfer
Answer the question using the chart data.
Data: - Epsilon: 28 - Beta: 174 - Alpha: 59 - Delta: 169 Question: What is the minimum value and which category has it?
28 (Epsilon)
chart_qa
Answer the question using the chart data.
Data: - Watch: 64 - Phone: 89 - Speaker: 42 - Laptop: 157 - Camera: 5 Question: What is the median value?
64
chart_qa
Answer the question using the chart data.
Data: - Jan: 155 - Feb: 87 - Aug: 9 - Mar: 49 - Jul: 72 Question: What percentage of the maximum value is Jul?
46.5%
chart_qa
Describe what the following matplotlib code will plot, including key statistics.
import matplotlib.pyplot as plt labels = ["Theta", "Eta", "Gamma", "Epsilon"] values = [156, 32, 120, 133] plt.plot(labels, values, marker='o') plt.title('Weekly Traffic') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
This code creates a line chart titled 'Weekly Traffic'. It has 4 categories, an average of 110.2, a median of 126.5, a maximum of 156 (Theta), a minimum of 32 (Eta), and an overall mixed trend.
code_to_desc
Answer the question using the chart data.
Data: - Console: 130 - Camera: 187 - Phone: 118 - Drone: 23 - Watch: 25 - Laptop: 87 - Tablet: 160 - Speaker: 42 Question: Which category has the third highest value?
Console
chart_qa
Modify the following matplotlib code according to the request.
Add a dotted grid to the plot. import matplotlib.pyplot as plt labels = ["LATAM", "MENA", "Africa", "Oceania", "NA", "APAC", "EU"] values = [115, 120, 63, 110, 91, 121, 107] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Ads vs Clicks') plt.xlabel('X') plt.ylabel('Y') plt.show()
import matplotlib.pyplot as plt labels = ["LATAM", "MENA", "Africa", "Oceania", "NA", "APAC", "EU"] values = [115, 120, 63, 110, 91, 121, 107] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Ads vs Clicks') plt.xlabel('X') plt.ylabel('Y') plt.grid(True, color='gray', linestyle=':') plt.sho...
style_transfer
Answer the question using the chart data.
Data: - Africa: 28 - APAC: 26 - Oceania: 28 - EU: 115 - MENA: 29 - LATAM: 195 - NA: 194 Question: If Africa were 170 instead of 28, what would the new average be?
108.1
chart_qa
Which matplotlib chart type is most appropriate for the data below?
- Zeta: 189 - Eta: 18 - Theta: 78 - Delta: 158
scatter — A scatter chart is best for showing the relationship between two numerical variables.
chart_choice
Modify the following matplotlib code according to the request.
Change this to a bar chart with green bars. import matplotlib.pyplot as plt labels = ["Delta", "Beta", "Zeta", "Theta", "Eta", "Alpha", "Epsilon", "Gamma"] values = [34, 200, 76, 151, 62, 114, 148, 164] plt.plot(labels, values, marker='o') plt.title('Stock Price') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True...
import matplotlib.pyplot as plt labels = ["Delta", "Beta", "Zeta", "Theta", "Eta", "Alpha", "Epsilon", "Gamma"] values = [34, 200, 76, 151, 62, 114, 148, 164] plt.bar(labels, values, color='seagreen') plt.title('Stock Price') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
style_transfer
Describe what the following matplotlib code will plot, including key statistics.
import matplotlib.pyplot as plt labels = ["Speaker", "Camera", "Tablet", "Drone"] values = [94, 6, 51, 41] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Stress vs Performance') plt.xlabel('X') plt.ylabel('Y') plt.show()
This code creates a scatter chart titled 'Stress vs Performance'. It has 4 categories, an average of 48, a median of 46.0, a maximum of 94 (Speaker), a minimum of 6 (Camera), and an overall mixed trend.
code_to_desc
Answer the question using the chart data.
Data: - Phone: 60 - Console: 101 - Camera: 112 - Speaker: 121 Question: How much larger is Camera than Speaker?
-9
chart_qa
Convert the CSV data into a Python matplotlib scatter chart.
category,value Beta,118 Alpha,174 Theta,113 Zeta,129 Eta,160 Gamma,118 Delta,111 Epsilon,74
import matplotlib.pyplot as plt labels = ["Beta", "Alpha", "Theta", "Zeta", "Eta", "Gamma", "Delta", "Epsilon"] values = [118, 174, 113, 129, 160, 118, 111, 74] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Price vs Rating') plt.xlabel('X') plt.ylabel('Y') plt.show()
data_to_code
Answer the question using the chart data.
Data: - Beta: 175 - Gamma: 83 - Zeta: 16 - Epsilon: 61 - Delta: 106 - Eta: 158 Question: What percentage of the total does Zeta represent?
2.7%
chart_qa
Modify the following matplotlib code according to the request.
Add a dotted grid to the plot. import matplotlib.pyplot as plt labels = ["APAC", "Oceania", "NA", "MENA", "EU"] values = [196, 115, 49, 38, 102] plt.bar(labels, values, color='steelblue') plt.title('Units Sold') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
import matplotlib.pyplot as plt labels = ["APAC", "Oceania", "NA", "MENA", "EU"] values = [196, 115, 49, 38, 102] plt.bar(labels, values, color='steelblue') plt.title('Units Sold') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.grid(True, color='gray', linestyle=':') plt.show(...
style_transfer
Write Python matplotlib code for a scatter chart using the data below.
Chart type: scatter - Alpha: 24 - Delta: 85 - Theta: 152 - Eta: 114
import matplotlib.pyplot as plt labels = ["Alpha", "Delta", "Theta", "Eta"] values = [24, 85, 152, 114] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Stress vs Performance') plt.xlabel('X') plt.ylabel('Y') plt.show()
chart_to_code
Write Python matplotlib code for a pie chart using the data below.
Chart type: pie - Jul: 97 - Jan: 27 - Mar: 116 - Feb: 32 - Apr: 67 - Jun: 116
import matplotlib.pyplot as plt labels = ["Jul", "Jan", "Mar", "Feb", "Apr", "Jun"] values = [97, 27, 116, 32, 67, 116] plt.pie(values, labels=labels, autopct='%1.1f%%') plt.title('Category Share') plt.show()
chart_to_code
Answer the question using the chart data.
Data: - Africa: 140 - APAC: 135 - EU: 54 - Oceania: 94 - NA: 94 - LATAM: 191 - MENA: 170 Question: What is the average value across all categories?
125.4
chart_qa
Modify the following matplotlib code according to the request.
Rotate the x-axis labels by 90 degrees. import matplotlib.pyplot as plt labels = ["Tablet", "Speaker", "Laptop", "Phone", "Camera", "Console"] values = [131, 123, 198, 149, 199, 153] plt.bar(labels, values, color='steelblue') plt.title('Counts by Category') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotatio...
import matplotlib.pyplot as plt labels = ["Tablet", "Speaker", "Laptop", "Phone", "Camera", "Console"] values = [131, 123, 198, 149, 199, 153] plt.bar(labels, values, color='steelblue') plt.title('Counts by Category') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.xticks(rotat...
style_transfer
Write Python matplotlib code for a scatter chart using the data below.
Chart type: scatter - Beta: 156 - Delta: 19 - Eta: 95 - Gamma: 134 - Epsilon: 23
import matplotlib.pyplot as plt labels = ["Beta", "Delta", "Eta", "Gamma", "Epsilon"] values = [156, 19, 95, 134, 23] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Age vs Income') plt.xlabel('X') plt.ylabel('Y') plt.show()
chart_to_code
Which matplotlib chart type is most appropriate for the data below?
- Jun: 170 - Jul: 28 - Mar: 162 - Jan: 157
pie — A pie chart is best for showing proportions of a whole.
chart_choice
Answer the question using the chart data.
Data: - Alpha: 20 - Delta: 120 - Epsilon: 31 - Beta: 92 - Gamma: 187 - Eta: 26 - Zeta: 134 - Theta: 170 Question: What is the ratio of Theta to Beta?
1.85
chart_qa
Modify the following matplotlib code according to the request.
Change the color of the chart. import matplotlib.pyplot as plt labels = ["APAC", "LATAM", "Africa", "Oceania", "MENA", "NA"] values = [166, 170, 90, 21, 89, 29] plt.bar(labels, values, color='steelblue') plt.title('Units Sold') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.s...
import matplotlib.pyplot as plt labels = ["APAC", "LATAM", "Africa", "Oceania", "MENA", "NA"] values = [166, 170, 90, 21, 89, 29] plt.bar(labels, values, color='seagreen') plt.title('Units Sold') plt.xlabel('Category') plt.ylabel('Count') plt.xticks(rotation=45) plt.tight_layout() plt.show()
style_transfer
Modify the following matplotlib code according to the request.
Change the color of the chart. import matplotlib.pyplot as plt labels = ["Jun", "Jan", "May", "Feb", "Mar", "Aug", "Apr", "Jul"] values = [157, 186, 26, 84, 148, 101, 169, 89] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Price vs Rating') plt.xlabel('X') plt.ylabel('Y') plt.show()
import matplotlib.pyplot as plt labels = ["Jun", "Jan", "May", "Feb", "Mar", "Aug", "Apr", "Jul"] values = [157, 186, 26, 84, 148, 101, 169, 89] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Price vs Rating') plt.xlabel('X') plt.ylabel('Y') plt.show()
style_transfer
Convert the CSV data into a Python matplotlib line chart.
category,value NA,54 APAC,62 Africa,40 EU,44 Oceania,24 LATAM,80 MENA,30
import matplotlib.pyplot as plt labels = ["NA", "APAC", "Africa", "EU", "Oceania", "LATAM", "MENA"] values = [54, 62, 40, 44, 24, 80, 30] plt.plot(labels, values, marker='o') plt.title('Stock Price') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
data_to_code
Write Python matplotlib code for a line chart using the data below.
Chart type: line - Drone: 117 - Laptop: 16 - Console: 110 - Camera: 98 - Speaker: 178 - Tablet: 189
import matplotlib.pyplot as plt labels = ["Drone", "Laptop", "Console", "Camera", "Speaker", "Tablet"] values = [117, 16, 110, 98, 178, 189] plt.plot(labels, values, marker='o') plt.title('Weekly Traffic') plt.xlabel('Period') plt.ylabel('Value') plt.grid(True, linestyle='--', alpha=0.5) plt.show()
chart_to_code
Describe what the following matplotlib code will plot, including key statistics.
import matplotlib.pyplot as plt labels = ["Watch", "Tablet", "Console", "Laptop", "Drone", "Camera", "Speaker"] values = [123, 77, 102, 133, 140, 112, 46] x = list(range(len(values))) plt.scatter(x, values, color='coral') plt.title('Price vs Rating') plt.xlabel('X') plt.ylabel('Y') plt.show()
This code creates a scatter chart titled 'Price vs Rating'. It has 7 categories, an average of 104.7, a median of 112, a maximum of 140 (Drone), a minimum of 46 (Speaker), and an overall mixed trend.
code_to_desc
End of preview. Expand in Data Studio

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Orbura AutoScientist Data Visualization Dataset

Dataset Description

A synthetic instruction-tuning corpus for data visualization tasks, built for the AutoScientist Challenge Part 2 (Data Visualization). Every example is deterministically generated — no human annotation, no LLM-generated labels — so the ground truth is exact and reproducible.

Task types

Task Weight Description
chart_qa 45% Arithmetic, comparison, and trend questions about chart data (max, min, sum, avg, median, range, pct_total, ratio, rank, above_avg, trend, difference, counterfactual, percentage_change)
chart_to_code 15% Generate matplotlib code from a chart type + data table
fix_code 10% Repair common matplotlib bugs (typos, missing imports, mismatched lengths, invalid kwargs, string values, swapped axes)
code_to_desc 10% Describe what a matplotlib code block produces, including key statistics
style_transfer 10% Modify an existing plot (change chart type, add grid, rotate labels, change color)
chart_choice 5% Select the most appropriate chart type for given data
data_to_code 5% Convert CSV data into a matplotlib chart

Chart types covered

  • line — trend visualization
  • bar — category comparison
  • scatter — correlation
  • pie — proportion of a whole

Multimodal extension

A 100-row multimodal pilot (generate_multimodal_pilot.py) generates rendered chart images (PNG) with chart-QA pairs. This extends the text-only dataset with visual reasoning: the model sees a rendered chart and answers questions about it. The pilot covers bar, grouped bar, stacked bar, line, multi-line, scatter, pie, donut, area, and mixed (bar + line overlay) chart types.

Files

File Rows Description
adaption_train_10k.jsonl 10,000 Training set (column-mapped for Adaption)
adaption_val_2k.jsonl 2,000 Validation set (held-out)
adaption_pilot_500.jsonl 500 Small pilot for quick iteration
train_10k.jsonl 10,000 Training set (raw, pre-Adaption-mapping)
val_2k.jsonl 2,000 Validation set (raw, pre-Adaption-mapping)
multimodal_pilot/ 100 Rendered chart images + metadata

Schema

Field Description
instruction Task prompt
input Context (data table, CSV, code, or chart metadata)
output Ground-truth completion (deterministic)
task Sub-task name
category Always data_visualization
messages Chat-formatted version for SFT

Generation

Generated deterministically by generate_full.py with seed 42 (train) and seed 2024 (val). The Adaption column mapping is applied by prepare_adaption.py.

python3 generate_full.py        # → train_10k.jsonl + val_2k.jsonl
python3 prepare_adaption.py     # → adaption_train_10k.jsonl + adaption_val_2k.jsonl
python3 generate_multimodal_pilot.py  # → multimodal_pilot/

Augmentation

The dataset is designed to be augmented via Adaption Adaptive Data with:

  • reasoning_traces: enabled
  • prompt_rephrase: disabled (rewrites system prompts, causing train/inference mismatch — learned from Part 1 post-mortem)
  • deduplication: enabled

Usage

import json

with open("adaption_train_10k.jsonl") as f:
    for line in f:
        example = json.loads(line)
        # example["instruction"], example["input"], example["output"], example["task"]

License

Apache 2.0

Downloads last month
77