source
stringclasses
5 values
task
stringclasses
6 values
prompt
stringlengths
384
8.15k
completion
stringlengths
132
11.9k
TIGER-Lab/VisCode-Multi-679K
svg_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"289.04\"\n height=\"600\"\n>\n\n \n <rect width=\"100%\" height=\"100%\"\n style=\"fill:#ffffff;fill-opacity:1;stroke:#888888;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><polygon points=\"100,20 78.84,70.88 23.92,75.28 65.76,111.12 52.98,164.72 100,136 147.02,164.72 134.24,111.12 176.08,75.28 121.16,70.88\" fill=\"#E67E22\" stroke=\"purple\" stroke-width=\"2\" /></svg>\n```"}]
TIGER-Lab/VisCode-Multi-679K
svg_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"500\" height=\"420\" version=\"1.0\" id=\"ezcGraph\"><defs/><g id=\"ezcGraphChart\" color-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeLegibility\"><path d=\" M 0.0000,420.0000 L 0.0000,...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><rect x=\"50\" y=\"110\" width=\"95\" height=\"60\" fill=\"#95A5A6\" /><polygon points=\"40,110 97.5,75 155,110\" fill=\"#E74C3C\" /><rect x=\"85\" y=\"170\" width=\"25\" height=\"30\" fill=\"#5D4037\" /></svg>\n```"}]
synthetic-turtle
turtle_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nimport turtle\n\nscreen = turtle.Screen()\nt = turtle.Turtle()\nt.pensize(2)\nt.pencolor('yellow')\nt.speed(0)\nfor i in range(170):\n t.forward(6 + i * 3)\n t.left(120)\nt.hideturtle()\nscreen.mainloop()\n```"}]
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\n# Mock confusion matrix data\nY_test = np.array([1, 2, 1, 2])\nprobstest = np.array([[0.9, 0.1], [0.4, 0.6], [0.8, 0.2], [0.3, 0.7]])\n\n# Create confusion matrix\nlabel = np.zeros(len(Y...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, toothpaste\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['toothpaste'].tolist()\nplt.plot(monthList, salesData, label='toothpaste Sales data', mar...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, shampoo\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['shampoo'].tolist()\nplt.scatter(monthList, salesData, label='shampoo Sales data')\nplt.xlab...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><polygon points=\"158.89,66 113.83,68.94 85.86,33.49 74.73,77.25 32.37,92.89 70.56,117 72.34,162.12 107.07,133.26 150.53,145.5 133.81,103.55\" fill=\"#2C3E50\" stroke=\"green\" stroke-width=\"4\" /></svg>\n```"}]
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><path d=\"M 80 159 C 8 114, 41 54, 80 93 C 119 54, 152 114, 80 159 Z\" fill=\"#9B59B6\" /></svg>\n```"}]
synthetic-pil
pil_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nfrom PIL import Image, ImageDraw\nimg = Image.new(\"RGB\", (640, 400), \"white\")\nd = ImageDraw.Draw(img)\nfor i in range(12):\n height = 30 + i * 25\n x0 = 40 + i * (35 + 10)\n d.rectangle([x0, 360 - height, x0 + 35, 360],\n fill=(90 - i * 10, 100 ...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, toothpaste\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['toothpaste'].tolist()\nplt.bar(monthList, salesData, label='toothpaste Sales data')\nplt...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><circle cx=\"100\" cy=\"100\" r=\"44\" fill=\"#F1C40F\" /><line x1=\"177.27\" y1=\"79.29\" x2=\"159.89\" y2=\"83.95\" stroke=\"#F1C40F\" stroke-width=\"3\" /><line x1=\"169.28\" y1=\"140\" x2=\"153.69\" y2=\"131\" strok...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import plotly.graph_objects as go\nimport pandas as pd\nimport io\nfrom PIL import Image\n\n# Example data format (first two lines):\n# Misconduct Type,Frequency\n# Withholding Evidence,32\ndata = pd.read_csv(\"data.csv\") # Replace with actual file path\n\ndef generate_plot(data):\n...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import json\nimport io\nwith open('data.json', 'r') as f:\n data = json.loads(f.read())\nimport graphviz\nfrom io import BytesIO\nfrom PIL import Image\n\ndef generate_diagram(data):\n # Create a new directed graph\n dot = graphviz.Digraph(comment='Activity Diagram', format='...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport seaborn as sns; import pandas as pd; from matplotlib import pyplot; df = pd.DataFrame({'emo': ['joy', 'sadness', 'anger'], 'emo value': [70, 20, 10]}); sns.set(font_scale=1.5); sns.set_style('white'); p = sns.barplot(data=df, x='emo', y='emo val...
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import numpy as np\nimport matplotlib.pyplot as plt\nfrom io import BytesIO\nfrom PIL import Image\n\nimport pandas as pd\n\n# Example data format (first two lines):\n# year,nominations,wins,nominations_error,wins_error\n# 2001,2,1,0.5,0.2\ndata = pd.read_csv(\"data.csv\") # Replace ...
synthetic-pil
pil_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nfrom PIL import Image, ImageDraw\nimg = Image.new(\"RGB\", (640, 400), \"white\")\nd = ImageDraw.Draw(img)\nfor i in range(14):\n height = 30 + i * 35\n x0 = 40 + i * (30 + 10)\n d.rectangle([x0, 360 - height, x0 + 30, 360],\n fill=(200 - i * 10, 50 ...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, shampoo\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['shampoo'].tolist()\nplt.plot(monthList, salesData, label='shampoo Sales data', marker='o')\...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><polygon points=\"130.8,10.8 87.6,94.95 120,94.95 98.4,169.2 157.8,75.15 125.4,75.15\" fill=\"#F1C40F\" stroke=\"none\" stroke-width=\"0\" /></svg>\n```"}]
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport numpy as np\n\n# Mock data\nN = 1000\nfs = 1000\nf0 = fs/4\nf1 = f0 + 0.01\nf2 = f0 + 0.25\nf3 = f0 + 0.5\nww = np.linspace(0, fs/2, N//2)\nmodulo0 = np.random.rand(N//2)\nmodulo1 = np.random.rand(N//2)\nmodulo2 = np.random.rand(N//2)\nmodulo3 =...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><rect x=\"25\" y=\"45\" width=\"22\" height=\"135\" fill=\"#E67E22\" /><rect x=\"53\" y=\"60\" width=\"22\" height=\"120\" fill=\"#E67E22\" /><rect x=\"81\" y=\"115\" width=\"22\" height=\"65\" fill=\"#E67E22\" /><rect ...
TIGER-Lab/VisCode-Multi-679K
svg_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "<svg width=\"689pt\" height=\"218pt\"\n viewBox=\"0.00 0.00 689.00 218.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 214)\">\n<title>ConnectorItem::shape</title>\n<...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><circle cx=\"52\" cy=\"100\" r=\"24\" fill=\"#E91E63\" /><circle cx=\"100\" cy=\"90\" r=\"36\" fill=\"#E91E63\" /><circle cx=\"146.4\" cy=\"100\" r=\"22\" fill=\"#E91E63\" /></svg>\n```"}]
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "from bokeh.plotting import figure, output_notebook, show\nimport numpy as np\n\n# Mock data for training and testing errors over iterations\nx_axis = np.arange(0, 80000, 2000)\ntrain_error_group = [np.exp(-x_axis/20000) + 0.05 * np.random.rand(len(x_axis)) for _ in range(3)]\ntest_err...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import plotly.figure_factory as ff\nimport pandas as pd\n\n# Mock data for demonstration\nimport numpy as np\nratings_data = np.random.uniform(1, 5, size=100)\ndf = pd.DataFrame({'Avg Rating': ratings_data})\n\n# Create a distribution plot\nfig = ff.create_distplot([df['Avg Rating'].t...
synthetic-turtle
turtle_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nimport turtle\n\nscreen = turtle.Screen()\nt = turtle.Turtle()\nt.pensize(2)\nt.pencolor('cyan')\nt.speed(0)\nfor i in range(190):\n t.forward(8 + i * 4)\n t.left(120)\nt.hideturtle()\nscreen.mainloop()\n```"}]
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport seaborn as sns\nimport numpy as np\n\n# Mock data\nnp.random.seed(0)\ndata = np.random.rand(10, 5)\n\nsns.set()\n\nfig, ax = plt.subplots()\nax = sns.boxplot(data=data, ax=ax)\nax = sns.swarmplot(data=data, size=2, color='.3', linewidth=0, ax=ax...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: shampoo, month_number\nimport matplotlib.pyplot as plt\n\nsalesData = df['shampoo'].tolist()\nmonthList = df['month_number'].tolist()\nplt.pie(salesData, labels=monthList, autopct='%1.1f%%')\nplt.title('sha...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: toothpaste, month_number\nimport matplotlib.pyplot as plt\n\nsalesData = df['toothpaste'].tolist()\nmonthList = df['month_number'].tolist()\nplt.pie(salesData, labels=monthList, autopct='%1.1f%%')\nplt.titl...
synthetic-pil
pil_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nfrom PIL import Image, ImageDraw\nimg = Image.new(\"RGB\", (640, 400), \"white\")\nd = ImageDraw.Draw(img)\nfor i in range(11):\n height = 30 + i * 40\n x0 = 40 + i * (45 + 15)\n d.rectangle([x0, 360 - height, x0 + 45, 360],\n fill=(200 - i * 10, 110...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\n# Mock data for demonstration\nheadlines = [\n \"Breaking News: Economy on the rise\",\n \"Sports Update: Local team wins championship\",\n \"Weather Alert: Storm warning issued\",\n \"Technolog...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import plotly.express as px\n\n# Mock data\nimport pandas as pd\n\ndata = {'Marks': [75, 85, 95], 'Days': [10, 20, 30]}\ndf = pd.DataFrame(data)\n\nfig = px.scatter(df, x='Marks', y='Days')\nfig.show()"}]
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import numpy as np\nimport matplotlib.pyplot as plt\n\n# Create mock data for a simple 2x2 matrix\na, b = 2, 3\nA = np.array([[0, a], [b, 0]])\n\n# Function to compute eigenvalues and eigenvectors\ndef right_landa_left(matrix):\n eigenvals, eigenvects = np.linalg.eig(matrix)\n l...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport seaborn as sns\nimport pandas as pd\nimport numpy as np\n\n# Mock data for Salaries DataFrame\nSalaries = pd.DataFrame({\n 'Q10_buckets': [0, 1, 2, 1],\n 'Q4': ['Bachelor’s degree', 'Master’s degree', 'Post grad', 'Less than a Bachelors']\...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: shampoo\nimport matplotlib.pyplot as plt\n\nsalesData = df['shampoo'].tolist()\nplt.hist(salesData, bins=5, edgecolor='black')\nplt.xlabel('Sales Data')\nplt.ylabel('Frequency')\nplt.title('shampoo Sales da...
synthetic-pil
pil_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nfrom PIL import Image, ImageDraw\nimg = Image.new(\"RGB\", (640, 400), \"white\")\nd = ImageDraw.Draw(img)\nfor i in range(9):\n height = 30 + i * 35\n x0 = 40 + i * (40 + 20)\n d.rectangle([x0, 360 - height, x0 + 40, 360],\n fill=(160 - i * 10, 50 +...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import json\nwith open('data.json', 'r') as f:\n data = json.loads(f.read())\nimport graphviz\nfrom PIL import Image\nimport io\n\ndef generate_diagram(data):\n # Create a new directed graph\n dot = graphviz.Digraph(comment='Daily Work Routine with Micro-Exercises')\n dot....
TIGER-Lab/VisCode-Multi-679K
svg_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"500\" height=\"420\" version=\"1.0\" id=\"ezcGraph\"><defs/><g id=\"ezcGraphChart\" color-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeLegibility\"><path d=\" M 0.0000,420.0000 L 0.0000,...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><polygon points=\"122.26,183.07 134.19,127.69 185.88,104.5 136.9,76.04 130.82,19.71 88.61,57.5 33.17,45.88 56.06,97.7 27.87,146.84 84.23,141.08\" fill=\"#E67E22\" stroke=\"black\" stroke-width=\"3\" /></svg>\n```"}]
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, soap\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['soap'].tolist()\nplt.plot(monthList, salesData, label='soap Sales data', marker='o')\nplt.xlab...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "from bokeh.plotting import figure, show\nfrom bokeh.models import ColumnDataSource, HoverTool\nimport pandas as pd\n\n# Create mock data similar to original\nresults_df2 = pd.DataFrame({\n 'Type': [\n 'Pandas Append', 'Pandas Append', 'Pandas Append', 'Pandas Append',\n ...
TIGER-Lab/VisCode-Multi-679K
svg_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" class=\"svglite\" width=\"504.00pt\" height=\"504.00pt\" viewBox=\"0 0 504.00 504.00\">\n<defs>\n <style type=\"text/css\"><![CDATA[\n .svglite line, .svglite polyline, .svglite polygon, .svglit...
synthetic-turtle
turtle_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nimport turtle\n\nscreen = turtle.Screen()\nt = turtle.Turtle()\nt.pensize(6)\nt.pencolor('red')\nt.speed(0)\nt.fillcolor('red')\nt.begin_fill()\nfor _ in range(3):\n t.forward(285)\n t.left(120)\nt.end_fill()\nt.hideturtle()\nscreen.mainloop()\n```"}]
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, moisturizer\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['moisturizer'].tolist()\nplt.scatter(monthList, salesData, label='moisturizer Sales data...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\n# Mock data for functional network DataFrame\ndata = {\n 'Gene1': [0.2, 0.5, 0.3],\n 'Gene2': [0.1, 0.6, 0.4],\n 'Gene3': [0.3, 0.2, 0.5],\n}\nfuncNetDf = pd.DataFrame(data, index=['Gene1', 'Gene2', '...
synthetic-turtle
turtle_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nimport turtle\n\nscreen = turtle.Screen()\nt = turtle.Turtle()\nt.pensize(1)\nt.pencolor('purple')\nt.speed(0)\nfor _ in range(3):\n t.forward(200)\n t.left(120)\nt.hideturtle()\nscreen.mainloop()\n```"}]
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\nimport plotly.graph_objects as go\n\n# Mock DataFrame to simulate the structure of the sitemap DataFrame\ndata = {\n 'loc': [\n 'https://www.safelite.com/category1/page1',\n 'https://www.safelite.com/category2/page1',\n 'https://www.safelit...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, moisturizer\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['moisturizer'].tolist()\nplt.plot(monthList, salesData, label='moisturizer Sales data', ...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><circle cx=\"100\" cy=\"100\" r=\"34\" fill=\"#E67E22\" /><line x1=\"164.09\" y1=\"137\" x2=\"148.5\" y2=\"128\" stroke=\"#E67E22\" stroke-width=\"3\" /><line x1=\"137\" y1=\"164.09\" x2=\"128\" y2=\"148.5\" stroke=\"#E...
synthetic-turtle
turtle_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nimport turtle\n\nscreen = turtle.Screen()\nt = turtle.Turtle()\nt.pensize(2)\nt.pencolor('black')\nt.speed(0)\nfor i in range(100):\n t.forward(7 + i * 3)\n t.left(75)\nt.hideturtle()\nscreen.mainloop()\n```"}]
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import numpy as np\nimport matplotlib.pyplot as plt\nfrom io import BytesIO\nfrom PIL import Image\n\nimport pandas as pd\n\n# Example data format (first two lines):\n# Season,Netflix,Hulu,Amazon Prime Video,Disney+\n# Season 1,2850000,1750000,950000,650000\ndata = pd.read_csv(\"data....
synthetic-pil
pil_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nfrom PIL import Image, ImageDraw\nimg = Image.new(\"RGB\", (560, 740), \"#f0f0f0\")\nd = ImageDraw.Draw(img)\nfor i in range(2):\n lw = (i % 3) * 4 + 2\n d.rectangle([20 + i * 60, 30 + i * 40,\n 120 + i * 60, 130 + i * 40],\n outline='#B...
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\nimport numpy as np\nimport plotly.graph_objs as go\nimport datetime\n\n# Mock Data\ndef generate_mock_data(month):\n return pd.DataFrame({\n 'City': ['Vancouver'] * 10,\n 'price': np.random.randint(500, 3000, size=10),\n 'bedrooms': np.rand...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport numpy as np\n\n# Mock data for demonstration\nreal_results = np.random.rand(50) # Simulated real results\ndist_sums = np.random.rand(50) # Simulated predictions from KNN\n\n# PLOTTING RESULTS\nx = range(0, len(dist_sums))\ny1 = real_result...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import json\nwith open('data.json', 'r') as f:\n data = json.loads(f.read())\nimport graphviz\nfrom PIL import Image\nimport io\n\ndef generate_diagram(data):\n # Create a new directed graph\n dot = graphviz.Digraph(comment='Sea Turtle Nesting Activity Diagram')\n dot.attr...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\n\nx = np.array(range(25))\ny = x ** 1.3 + np.random.normal(10, 10, x.shape[0])\nX = np.stack((x, y), axis = 1)\nX_norm = (X - np.mean(X, axis=0)) / np.std(X, axis=0)\nsns.scatterplot(x = X_norm[:, 0], y = X_no...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, shampoo\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['shampoo'].tolist()\nplt.bar(monthList, salesData, label='shampoo Sales data')\nplt.xlabel('...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\nimport plotly.express as px\n\ndf = pd.DataFrame({\n 'State Initial': ['CA', 'NY', 'TX'],\n 'Annual Mean Wage (All Occupations)': [80000, 75000, 70000],\n 'Post Tax Annual Salary': [60000, 55000, 50000],\n 'Annual Salary Rounded': [60000, 55000, 50000]...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><rect x=\"25\" y=\"100\" width=\"40\" height=\"80\" fill=\"#9B59B6\" /><rect x=\"71\" y=\"100\" width=\"40\" height=\"80\" fill=\"#9B59B6\" /><rect x=\"117\" y=\"125\" width=\"40\" height=\"55\" fill=\"#9B59B6\" /><line...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\n\n# Sample data for plotting\nresults = [{'size': 10, 'duration': 0.01, 'type': 'scipy'}, {'size': 20, 'duration': 0.02, 'type': 'implemented'}]\ndf = pd.DataFrame.from_dict(results)\n\nax...
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\n# Mock data\nn_values = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000]\nrepetition = 100\n\ntimes_data = {\n 1000: np.random.rand(repetition),\n 2000: np.random.rand(repetition),\n 3000: np.random.r...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import plotly.graph_objects as go\nimport pandas as pd\n\n# Mock data\nrecords = pd.DataFrame({\n 'equity': [100, 150, 120, 180],\n}, index=pd.date_range(start='2021-01-01', periods=4))\n\nfig = go.Figure()\ntrace = go.Scatter(x=records.index, y=records['equity'], name='equity', mo...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><polygon points=\"100,188 115.28,121.03 183.69,127.19 124.73,91.97 151.73,28.81 100,74 48.27,28.81 75.27,91.97 16.31,127.19 84.72,121.03\" fill=\"#F1C40F\" stroke=\"brown\" stroke-width=\"4\" /></svg>\n```"}]
synthetic-turtle
turtle_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nimport turtle\n\nscreen = turtle.Screen()\nt = turtle.Turtle()\nt.pensize(2)\nt.pencolor('black')\nt.speed(0)\nfor i in range(90):\n t.forward(9 + i * 5)\n t.left(75)\nt.hideturtle()\nscreen.mainloop()\n```"}]
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><rect x=\"70\" y=\"110\" width=\"105\" height=\"60\" fill=\"#E67E22\" /><polygon points=\"60,110 122.5,65 185,110\" fill=\"#E74C3C\" /><rect x=\"110\" y=\"165\" width=\"25\" height=\"35\" fill=\"#5D4037\" /></svg>\n```"...
synthetic-turtle
turtle_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nimport turtle\nimport math\n\nscreen = turtle.Screen()\nt = turtle.Turtle()\nt.pensize(2)\nt.speed(0)\nR = 120 / (2 * math.sin(math.pi / 6))\nverts = [(R * math.cos(math.radians(90 + i * 60)),\n R * math.sin(math.radians(90 + i * 60))) for i in range(6)]\nt.penup(...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: moisturizer, month_number\nimport matplotlib.pyplot as plt\n\nsalesData = df['moisturizer'].tolist()\nmonthList = df['month_number'].tolist()\nplt.pie(salesData, labels=monthList, autopct='%1.1f%%')\nplt.ti...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, shampoo\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['shampoo'].tolist()\nplt.scatter(monthList, salesData, label='shampoo Sales data')\nplt.xlab...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport seaborn as sns\nimport pandas as pd\nimport numpy as np\n\n# Sample data for countplot\n\ndf = pd.DataFrame({'stars': np.random.randint(1, 6, size=100)})\nsns.set_style('white')\nsns.countplot(x='stars', data=df, palette='rainbow')\nplt.title('C...
synthetic-pil
pil_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nfrom PIL import Image, ImageDraw\nimg = Image.new(\"RGB\", (340, 540), \"#f0f0f0\")\nd = ImageDraw.Draw(img)\nfor i in range(6):\n lw = (i % 3) * 4 + 2\n d.rectangle([20 + i * 35, 30 + i * 40,\n 120 + i * 35, 130 + i * 40],\n outline='#0...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport pandas as pd\n\n# Mock data\nTable_BTC_1 = pd.DataFrame({\n 'Height': [1, 2, 3, 4],\n 'size_B': [1000, 2000, 1500, 3000],\n 'fee_total': [120000000, 200000000, 130000000, 300000000],\n 'Txn': [10, 20, 15, 30]\n})\n\n# Plotting exampl...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\nimport plotly.express as px\n\n# Mock data\ndata = {\n 'df1': pd.DataFrame({\n 'A': [1, 2, 3, 4, 5],\n 'B': [10, 11, 12, 13, 14],\n 'C': [5, 4, 3, 2, 1]\n }),\n 'df2': pd.DataFrame({\n 'X': [10, 20, 30, 40, 50],\n 'Y': [...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, shampoo\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['shampoo'].tolist()\nplt.scatter(monthList, salesData, label='shampoo Sales data')\nplt.xlab...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, toothpaste\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['toothpaste'].tolist()\nplt.plot(monthList, salesData, label='toothpaste Sales data', mar...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><polygon points=\"122.26,16.93 89.25,71.99 27.87,53.16 70.04,101.57 33.17,154.12 92.24,128.98 130.82,180.29 125.16,116.34 185.88,95.5 123.31,81.12\" fill=\"#8B4513\" stroke=\"red\" stroke-width=\"1\" /></svg>\n```"}]
TIGER-Lab/VisCode-Multi-679K
svg_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "<svg width=\"535pt\" height=\"127pt\"\n viewBox=\"0.00 0.00 535.00 127.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 123)\">\n<title>carla::road::Road::GetLanesAt</...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport numpy as np\n\n# Create some mock data for demonstration\nepochs = 10\nacc = np.random.rand(epochs) * 0.5 + 0.5 # Simulating training accuracy\nval_acc = np.random.rand(epochs) * 0.5 + 0.4 # Simulating validation accuracy\nloss = np.random.ran...
TIGER-Lab/VisCode-Multi-679K
svg_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"500\" height=\"420\" version=\"1.0\" id=\"ezcGraph\"><defs/><g id=\"ezcGraphChart\" color-rendering=\"optimizeQuality\" shape-rendering=\"geometricPrecision\" text-rendering=\"optimizeLegibility\"><path d=\" M 0.0000,420.0000 L 0.0000,...
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n# Mock data\nbroken_packets = np.random.randint(0, 100, size=100)\n\n# Plot settings\nsns.set(style=\"ticks\")\nf, (ax_box, ax_hist) = plt.subplots(2, sharex=True, gridspec_kw={\"height_ratios\": (.15, .85)}...
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport math\nimport cmath\n\nDvc = 50\nsigma = 0.05\nx1 = []\nx2 = []\nx3 = []\nx4 = []\n\nfor N in range(3, 1200):\n x1.append(cmath.sqrt((8 / N) * math.log(4 * (math.pow(2 * N, Dvc) + 1) / sigma)))\n x2.append(cmath.sqrt((2 / N) * math.log(2 * ...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, soap\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['soap'].tolist()\nplt.bar(monthList, salesData, label='soap Sales data')\nplt.xlabel('Month Num...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><circle cx=\"45.6\" cy=\"100\" r=\"34\" fill=\"#E91E63\" /><circle cx=\"100\" cy=\"98\" r=\"34\" fill=\"#E91E63\" /><circle cx=\"152.8\" cy=\"100\" r=\"32\" fill=\"#E91E63\" /></svg>\n```"}]
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import numpy as np\nimport matplotlib.pyplot as plt\n\n# Generate mock data\nnp.random.seed(0)\ntrain_X = np.random.rand(100, 585) # 100 samples, 585 features\ntrain_labels_dense = np.random.randint(0, 26, 100) # 100 labels for 26 classes\n\n# Function to convert dense labels to one...
synthetic-pil
pil_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nfrom PIL import Image, ImageDraw\nimg = Image.new(\"RGB\", (300, 380), \"#f0f0f0\")\nd = ImageDraw.Draw(img)\nfor i in range(3):\n lw = (i % 3) * 4 + 2\n d.rectangle([20 + i * 35, 30 + i * 30,\n 120 + i * 35, 130 + i * 30],\n outline='#0...
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\nimport plotly.figure_factory as ff\nimport numpy as np\n\n# Mock data\nnp.random.seed(0)\nN = 100\nsquared_errors = np.random.rand(N) ** 2 # Simulated squared errors\n\n# Create a histogram plot of Squared Errors\nhist_data = [squared_errors]\ngroup_labels = ['Sq...
synthetic-pil
pil_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nfrom PIL import Image, ImageDraw\nimg = Image.new(\"RGB\", (640, 400), \"white\")\nd = ImageDraw.Draw(img)\nfor i in range(12):\n height = 30 + i * 30\n x0 = 40 + i * (45 + 15)\n d.rectangle([x0, 360 - height, x0 + 45, 360],\n fill=(190 - i * 10, 50 ...
TIGER-Lab/VisCode-Multi-679K
svg_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "<svg width=\"1280\" height=\"720\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" overflow=\"hidden\"><defs><clipPath id=\"clip0\"><rect x=\"0\" y=\"0\" width=\"1280\" height=\"720\"/></clipPath></defs><g clip-path=\"url(#clip0)\"><rect x=\"0\" y=\"0...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><circle cx=\"100\" cy=\"100\" r=\"38\" fill=\"#F1C40F\" /><line x1=\"28\" y1=\"100\" x2=\"40\" y2=\"100\" stroke=\"#F1C40F\" stroke-width=\"4\" /><line x1=\"37.65\" y1=\"64\" x2=\"48.04\" y2=\"70\" stroke=\"#F1C40F\" st...
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.decomposition import PCA\nfrom io import BytesIO\nfrom PIL import Image\n\nimport pandas as pd\n\n# Example data format (first two lines):\n# Species,Effectiveness_Muscl...
TIGER-Lab/VisCode-Multi-679K
plot_debug
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import matplotlib.pyplot as plt\nimport numpy as np\n\n# Mock data for testing\nwl = np.linspace(15600, 16300, 1000)\napstar_data = np.random.rand(3, 1000) * 1000\nindex = 0\n\nplt.subplot(2, 1, 1)\nplt.step(wl, apstar_data[1, :], 'k', label='$APOGEE\\quad team\\quad spectra$', linewi...
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><polygon points=\"66,41.11 76.25,89.42 33.49,114.14 82.6,119.32 92.89,167.63 113,122.52 162.12,127.66 125.43,94.59 145.5,49.47 102.72,74.14\" fill=\"#9B59B6\" stroke=\"purple\" stroke-width=\"3\" /></svg>\n```"}]
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><path d=\"M 110 149.25 C 56 115.5, 80.75 70.5, 110 99.75 C 139.25 70.5, 164 115.5, 110 149.25 Z\" fill=\"#9B59B6\" /></svg>\n```"}]
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import plotly.graph_objs as go\nimport plotly.io as pio\nfrom PIL import Image\nimport io\n\nimport pandas as pd\n\n# Example data format (first two lines):\n# Major,Percentage\n# Political Science,22.5\ndata = pd.read_csv(\"data.csv\") # Replace with actual file path\n\ndef generate...
prashantss1404/Matplotlib_Seaborn_merged_prompt_completion_10k
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import pandas as pd\ndf = pd.read_csv(\"data.csv\") # input dataset, columns: month_number, shampoo\nimport matplotlib.pyplot as plt\n\nmonthList = df['month_number'].tolist()\nsalesData = df['shampoo'].tolist()\nplt.scatter(monthList, salesData, label='shampoo Sales data')\nplt.xlab...
synthetic-turtle
turtle_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nimport turtle\n\nscreen = turtle.Screen()\nt = turtle.Turtle()\nt.pensize(2)\nt.pencolor('red')\nt.speed(0)\nfor i in range(160):\n t.forward(4 + i * 2)\n t.left(45)\nt.hideturtle()\nscreen.mainloop()\n```"}]
synthetic-svg
svg_generation
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```svg\n<svg viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"><circle cx=\"42.4\" cy=\"100\" r=\"36\" fill=\"#95A5A6\" /><circle cx=\"100\" cy=\"94\" r=\"36\" fill=\"#95A5A6\" /><circle cx=\"149.6\" cy=\"100\" r=\"26\" fill=\"#95A5A6\" /></svg>\n```"}]
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import datetime as dt\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom matplotlib import style\nimport numpy as np\n\nstyle.use('ggplot')\n\n# Create mock data\ndate_range = pd.date_range(start='2019-01-01', end='2021-01-10', freq='D')\nnp.random.seed(0)\nadj_close = np.ran...
TIGER-Lab/VisCode-Multi-679K
chart_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "import json\nwith open('data.json', 'r') as f:\n data = json.loads(f.read())\nimport graphviz\nfrom PIL import Image\nimport io\n\ndef generate_diagram(data):\n # Create a new directed graph\n dot = graphviz.Digraph(comment='Python in Data Science and Machine Learning', forma...
synthetic-turtle
turtle_code
[{"role": "system", "content": "You are an expert Python drawing assistant. You write correct, runnable Python code for matplotlib charts, Turtle and PIL drawings, and clean SVG markup. When asked about plotting code you explain or fix it precisely. Always produce complete, self-contained code."}, {"role": "user", "con...
[{"role": "assistant", "content": "```python\nimport turtle\n\nscreen = turtle.Screen()\nt = turtle.Turtle()\nt.pensize(2)\nt.pencolor('hotpink')\nt.speed(0)\nfor i in range(150):\n t.forward(9 + i * 4)\n t.left(75)\nt.hideturtle()\nscreen.mainloop()\n```"}]