Manuel B. Garcia

Manuel B. Garcia serves as the Senior Director for Educational Technology and Digital Learning at FEU Institute of Technology, Manila, Philippines. Read More

Contact Info

1607, FEU Tech Building,
P. Paredes St, Sampaloc,
Manila, Philippines
mbgarcia@feutech.edu.ph

Follow Me

Can Generative AI Create an Accurate Figure From Raw Research Data?

Generative AI can transform raw research data into figures using plotting code and analytical tools. However, accurate figures require verified data transformations, correct statistical calculations, and faithful graphical encoding. Learn how to establish a reproducible workflow and audit every stage from source data to final figure.

487
AI Figures From Raw Research Data Guide 487 of 1196
01 · The Question

Can You Upload Raw Research Data to AI and Trust the Figure It Produces?

You have collected data for a research study and want to create a figure for your manuscript. Rather than manually preparing the graph, you upload the dataset to an AI-enabled analytical tool and ask it to visualize the results.

The tool produces a professional-looking chart with labeled axes, group comparisons, and error bars. The output appears ready for publication.

But did the system select the correct variables? Did it calculate the intended statistics, handle missing values appropriately, and preserve the relationship between observations and experimental units?

Creating a graph from raw data involves more than plotting numbers. It requires a sequence of analytical decisions, any one of which can change the meaning of the final figure.

02 · The Short Answer

Yes, When the Figure Is Computationally Derived From Verified Data and Independently Checked

In Brief

Generative AI can help create accurate figures from raw research data by generating executable plotting code, performing documented calculations, and organizing data into suitable visualizations. However, accuracy is not guaranteed simply because the figure was generated directly from a dataset.

Researchers should verify data import, variable selection, missing-value handling, transformations, statistical summaries, and graphical encoding. A reproducible workflow provides a stronger basis for verification than an unconstrained image-generation prompt, but the researcher remains responsible for establishing that the final figure represents the actual evidence.

03 · What You Need to Know

How Raw Research Data Become a Scientifically Accurate Figure

What Does It Mean to Generate a Figure From Raw Research Data?

Generating a figure from raw data involves converting recorded observations into a visual representation through a defined computational process.

The source may be a spreadsheet, CSV file, statistical dataset, database export, or instrument-generated data file.

Depending on the visualization, the process may involve plotting individual observations directly or calculating summaries such as means, proportions, regression estimates, or confidence intervals.

For example, a scatterplot may represent each student's study time and assessment score as a coordinate pair. A bar chart may instead display group means calculated from multiple observations.

These figures require different transformations and verification procedures.

AI can assist with both, but the resulting figure is accurate only if the underlying data and analytical operations have been handled correctly.

What Is the Difference Between Plotting Raw Observations and Plotting Summary Statistics?

Raw-data visualizations display individual observations or their distribution, while summary visualizations represent calculated quantities.

Observation-level visualization Plots individual recorded values or their distribution, such as a scatterplot, dot plot, or histogram.
Summary-statistic visualization Displays quantities calculated from observations, such as group means, proportions, effect estimates, or confidence intervals.

The distinction matters because summary figures require additional analytical decisions.

For example, calculating an average test score requires identifying which observations belong to each group and deciding how missing or invalid responses should be handled.

An incorrect summary can produce a misleading graph even when the plotting software faithfully displays the calculated values.

What Steps Are Required to Create a Figure From Raw Data?

A defensible workflow connects the original dataset to the final visualization through identifiable operations.

Stage Required Decision Possible AI Error
Data import Read the correct file, worksheet, and observations. Importing an incomplete range or interpreting columns incorrectly.
Variable identification Select variables corresponding to the research question. Confusing similarly named variables or measurement occasions.
Data preparation Apply justified filtering, coding, and missing-data procedures. Dropping valid observations or converting missing values to zeros.
Statistical calculation Compute the intended quantities using appropriate formulas. Calculating the wrong denominator, statistic, or uncertainty measure.
Graph selection Choose a visualization suited to the data structure. Using a graph that conceals distributions or ignores pairing.
Graphical encoding Map values accurately to positions, lengths, colors, or other visual elements. Incorrect axes, labels, scales, or category mappings.
Final verification Compare the figure with source data and analytical outputs. Accepting a visually plausible but incorrect graph.

Researchers should examine each stage rather than treating figure generation as a single operation.

Why Is Data Import a Scientific Accuracy Issue?

Errors can occur before any statistical calculation begins.

A dataset may contain multiple worksheets, coded missing values, dates, text-formatted numbers, or duplicate records. AI-generated code may interpret these incorrectly.

For example, a column containing "NA" may be treated as text, while a missing score coded as 999 could be interpreted as a genuine numerical observation.

Either error can affect the figure.

Researchers should verify imported row counts, column names, variable types, and missing-value frequencies against the original dataset and codebook.

When the source data are confidential, uploading them to an external AI service must also comply with the study's consent, ethics, and data-protection requirements.

Can AI Select the Wrong Variables While Producing a Correct-Looking Graph?

Yes. Variable names may be ambiguous, especially in datasets containing repeated assessments or multiple versions of the same measure.

Suppose a dataset includes pretest_score, posttest_score, and delayed_posttest_score. AI might plot delayed posttest scores when the researcher requested immediate posttest performance.

The graph could be internally consistent while answering the wrong research question.

Researchers should use a data dictionary and explicitly identify the intended variables.

Checking axis labels alone is insufficient because AI may label the graph correctly while plotting values from the wrong column.

How Can Missing Data Affect an AI-Generated Figure?

Missing data can influence both the numerical summaries and the interpretation of a graph.

For example, a line graph showing student performance over several assessments may include different numbers of students at each time point.

If AI silently excludes missing observations, the apparent trend may reflect changes in the composition of the sample.

Replacing missing values with zeros can produce a different distortion.

Researchers should establish how missingness was represented and handled in the approved analysis.

Legitimate imputation methods require methodological justification and documentation. They should not be confused with inventing convenient values to complete a graph.

Can AI Calculate Incorrect Summary Statistics?

Yes. AI-generated analytical code may calculate the wrong statistic even when the code executes without errors.

For example, it may calculate a weighted mean when an unweighted mean was intended, use the population standard deviation formula when a sample standard deviation was required, or summarize observations at the wrong level.

In clustered research, calculating an average across all individual observations may differ from averaging participant-level or institution-level summaries.

The appropriate calculation depends on the scientific estimand and study design.

Researchers should compare AI-generated summaries with independently verified statistical outputs or separately implemented calculations.

Can AI Create Incorrect Error Bars From Raw Data?

Yes. Error bars may represent standard deviations, standard errors, confidence intervals, or other quantities.

These measures answer different questions and should not be substituted for one another.

For example, the sample standard deviation describes variability among observations, while the standard error of a mean concerns uncertainty in the estimated mean under relevant assumptions.

Confidence intervals additionally depend on the estimation procedure and study design.

AI may calculate one quantity but label it as another.

Researchers should verify the formula, sample size, independence assumptions, and caption wording.

Why Does the Unit of Analysis Matter When Generating Graphs?

Research datasets often contain multiple observations from the same participant, specimen, classroom, or institution.

If AI treats every row as an independent unit, the resulting summary or uncertainty estimate may misrepresent the study design.

For example, a study might contain 500 student assessment records collected from 100 students across five occasions.

A graph of individual trajectories should preserve student identifiers, while a graph of model-estimated trends should reflect the appropriate repeated-measures analysis.

Researchers should distinguish the number of data rows from the number of independent experimental or sampling units.

This is especially important when AI generates confidence intervals or statistical annotations.

Can AI Create a Figure Directly From Statistical Software Output?

Yes. In some cases, using verified analytical output is preferable to asking AI to repeat the entire statistical analysis.

For example, a researcher may provide regression coefficients and confidence intervals calculated in R, SPSS, Stata, or another analytical environment and ask AI to generate a coefficient plot.

The figure can then be checked against the original model output.

However, the researcher must ensure that the estimates, reference categories, scales, and intervals are mapped correctly.

A coefficient plot using odds ratios requires different interpretation and reference-line placement from one displaying unexponentiated logistic regression coefficients.

Should Researchers Use AI Image Generators to Draw Statistical Graphs?

General-purpose text-to-image generation is generally unsuitable for producing empirical graphs that require exact numerical correspondence.

An image model may create plausible bars, curves, labels, or data points without maintaining a reliable relationship to the supplied dataset.

By contrast, executable plotting code can map numerical values to graphical coordinates through defined procedures.

This does not eliminate coding errors, but it makes the process more inspectable.

The broader use of generative AI for research figures and graphs should distinguish reproducible computational visualization from unconstrained image rendering.

How Should Researchers Choose the Graph Type?

Graph selection should reflect the research question, variable characteristics, and analytical purpose.

A scatterplot may be appropriate for two continuous variables, while a paired-point plot may better communicate individual changes across repeated measurements.

A bar chart of means may conceal distributional variation that is visible in a dot plot or box plot.

Weissgerber and colleagues (2015) demonstrated why commonly used summary graphs can obscure important characteristics of continuous data.

Researchers should therefore evaluate AI recommendations about graph selection rather than accepting the first proposed chart.

Can AI Generate a Correct Graph With a Misleading Scale?

Yes. A graph can contain correct numerical values while presenting them in a visually misleading manner.

For example, a bar chart with a truncated vertical axis may exaggerate differences because readers interpret bar length as magnitude.

Likewise, inconsistent time intervals displayed with equal horizontal spacing may distort the apparent rate of change.

Researchers should examine axis limits, transformations, intervals, aspect ratios, and visual encodings.

The figure should make relevant differences interpretable without artificially amplifying or concealing them.

Can AI Produce Accurate Graphs From Large Datasets?

Potentially, provided the computational environment can process the dataset correctly and the analytical procedures are appropriate.

Large datasets may require aggregation, sampling for display, or techniques for managing overplotting.

However, reducing the number of displayed observations can introduce representational problems if the procedure is not documented.

For example, plotting a random sample of observations may be useful for visualization, but the figure should not imply that every observation is displayed.

Researchers should verify that filtering or sampling preserves the intended interpretation and that reported sample sizes remain accurate.

How Can Researchers Verify Every Plotted Value?

The strongest approach is to inspect the data table or computational object supplied to the plotting function.

For example, a graph displaying five group means should be checked against a verified table containing those five means and their associated group identifiers.

For a scatterplot, the plotted coordinate pairs should correspond to the intended observations after documented filtering and transformation.

Researchers should also verify that category ordering, color mappings, and legends remain consistent.

The detailed process of verifying every value in AI-generated research figures is particularly important when the figure will support substantive claims.

What Is the Role of Reproducibility?

Reproducibility allows the researcher to regenerate a figure from the same source data and documented analytical procedure.

A useful record includes the source dataset, variable definitions, data transformations, plotting code, software versions, and final output.

Where stochastic procedures are involved, relevant random seeds and computational settings may also be necessary.

However, reproducibility should not be confused with correctness. An incorrect script can reproduce the same incorrect graph repeatedly.

Independent verification of calculations and graphical mappings remains necessary.

Can AI Introduce Data That Were Never Collected?

Yes. AI may invent observations or summary values when the supplied data are incomplete or when it misunderstands a request.

For example, asking AI to complete a trend graph may lead it to extrapolate future values without clearly distinguishing predictions from observations.

Forecasting and simulation can be legitimate analytical activities, but their assumptions and outputs should be labeled appropriately.

Unobserved predictions should not be presented as actual measurements.

The problem of AI inventing values during research visualization becomes a research integrity concern when synthetic information is misrepresented as empirical evidence.

How Should AI-Assisted Figure Creation Be Disclosed?

Researchers should follow the current requirements of their journal, institution, and discipline.

Where AI materially assists with data preparation, statistical calculations, or plotting, the analytical procedure should be documented sufficiently for evaluation and reproduction.

Some publishers distinguish reproducible AI-assisted data visualization from images produced by general-purpose generative image tools.

For example, Elsevier maintains specific generative AI policies for journal figures and data visualizations.

Researchers should verify the policy of the intended publication venue and avoid assuming that a general AI-use statement authorizes every form of generated visual content.

Who Is Responsible for the Final Figure?

The human researchers remain responsible for the accuracy and integrity of the published visualization.

AI can generate code, execute calculations through available tools, and suggest formatting improvements, but it cannot assume authorship responsibility for the reported findings.

Researchers should verify the final figure against the underlying evidence and retain records sufficient to explain how it was produced.

Human review should involve substantive checking of calculations and graphical content, not merely approving the appearance of the output.

Watch Out

Do not assume that uploading the correct dataset guarantees an accurate graph. AI may still select the wrong variables, silently exclude observations, calculate inappropriate summaries, or mislabel the axes. Verify the complete path from source data to plotted values.

04 · A Practical Example

Creating a Graph From Raw Student Assessment Data

Hypothetical Example

Visualizing Pretest and Posttest Scores in an Educational Technology Study

A researcher investigates changes in student assessment scores following the introduction of an AI-supported learning platform.

The dataset contains 80 students, each with a pretest score, a posttest score, and a unique participant identifier.

The researcher uploads the dataset to an AI-enabled analytical environment and requests a figure showing individual changes.

All numerical values in this example are hypothetical.

Step 1: Verify the Dataset Structure

The researcher confirms that the dataset contains 80 unique participants and that each participant has the expected assessment records.

Missing values and duplicate identifiers are examined before plotting.

Step 2: Define the Intended Visualization

Because the observations are paired, the researcher requests a paired-point plot connecting each student's pretest and posttest scores.

The plotting instructions specify that the participant identifier must be used to connect observations correctly.

Step 3: Inspect the AI-Generated Code

The initial code sorts pretest and posttest scores independently before connecting them.

This creates visually plausible lines but incorrectly pairs observations from different students.

The plotted values themselves are genuine, yet the relationships between them are wrong.

Step 4: Correct the Pairing

The researcher revises the code so that each pretest and posttest score is matched using the participant identifier.

The resulting graph accurately represents individual changes.

Step 5: Verify the Summary Statistics

The verified group mean increases from 62.4 at pretest to 74.1 at posttest.

The researcher checks that the displayed summary values match the original statistical output and that any uncertainty intervals are calculated appropriately.

Step 6: Interpret the Figure Within the Research Design

The graph shows an observed increase in scores, but it does not independently establish that the AI-supported platform caused the improvement.

Causal interpretation depends on the study design and other relevant evidence.

Step 7: Preserve the Analytical Record

The researcher retains the original dataset, corrected plotting code, verification results, and final figure.

The example illustrates that an AI-generated graph can use entirely authentic values while still being wrong because of an incorrect relationship between observations.

05 · What Researchers Often Get Wrong

Common Misconceptions About Creating AI Figures From Raw Data

Misconception

Does Uploading Raw Data Guarantee That AI Will Plot the Correct Values?

No. AI may select incorrect columns, misinterpret missing values, or apply unintended transformations. The source dataset and plotting procedure must be verified.

Misconception

Is a Graph Accurate Whenever Its Code Runs Successfully?

No. Executable code may contain logical or statistical errors that produce plausible but incorrect visualizations.

Misconception

Can Researchers Trust AI-Calculated Error Bars?

Not without checking the calculation and interpretation. Standard deviations, standard errors, and confidence intervals are different quantities and must be labeled correctly.

Misconception

Can AI Automatically Handle Missing Data Correctly?

Not necessarily. Missing-data treatment depends on the research design and analytical objectives. AI may silently exclude observations or apply inappropriate substitutions.

Misconception

Does Reproducible Plotting Code Establish Scientific Accuracy?

No. Reproducibility allows the figure to be regenerated, but the same incorrect calculations or mappings can be reproduced consistently.

Misconception

Can Researchers Use AI-Generated Figures Without Checking the Original Data?

No. The final figure should be traceable to authentic observations and verified analytical outputs, especially when it supports substantive research conclusions.

06 · What This Means for You

A Practical Workflow for Producing Accurate AI-Assisted Research Figures

Begin with a verified dataset and a clearly defined analytical purpose. Then separate the calculation stage from the graphical presentation stage so that errors can be identified more easily.

1. Inspect the source data

Verify observations, variable definitions, missing values, and relevant identifiers.

2. Specify the scientific quantity

Define exactly what the figure should display and how any summaries should be calculated.

3. Generate reproducible code

Use AI to assist with computational plotting rather than unconstrained image rendering.

4. Audit the plotting data

Compare the data supplied to the graph with verified observations or analytical outputs.

5. Inspect the graphical encoding

Check axes, labels, scales, uncertainty indicators, and category mappings.

6. Verify the interpretation

Ensure the figure does not imply relationships or conclusions unsupported by the study.

7. Preserve the workflow

Retain source data, scripts, processing records, and the final figure.

A Practical Prompt for Creating a Figure From Raw Data

Illustrative AI Prompt

"I am creating a research figure from a dataset containing [variables and descriptions]. The research question is [question], the study design is [design], and the intended visualization is [graph or analytical purpose]. Generate reproducible plotting code using only the supplied dataset. Before plotting, report the number of observations, variable types, missing values, and any filtering or transformations. Do not invent values, silently impute missing data, or calculate statistics that were not requested. Produce an auditable table of the exact values used in the figure. Explain how to verify axes, labels, group mappings, and uncertainty indicators against the source data."

After executing the code, inspect the plotting data and compare the result with independently verified analyses.

The final figure should communicate the actual evidence, including uncertainty and variation that may complicate a simple interpretation.

07 · A Quick Checklist

Before Accepting an AI Figure Generated From Raw Data, Verify These

Before publishing an AI-assisted figure derived from raw data, check:
Confirm that the correct source dataset and relevant observations were imported.
Verify variable names, measurement levels, and participant or specimen identifiers.
Inspect missing values, exclusions, and any data transformations.
Check that statistical summaries use the intended formulas and analytical units.
Verify that paired, clustered, or repeated observations retain their correct relationships.
Compare the exact plotting data with the original dataset or verified statistical output.
Check axes, scales, labels, legends, and graphical proportions.
Verify error bars, confidence intervals, and statistical annotations.
Preserve reproducible plotting code and relevant analytical records.
Confirm compliance with data-protection and publication requirements.
08 · Frequently Asked Questions

Frequently Asked Questions About AI Figures From Raw Research Data

Can ChatGPT generate graphs directly from raw research data?

Yes, when appropriate computational tools are available. ChatGPT can also generate plotting code for statistical software. Researchers must verify the imported data, calculations, and final graphical output.

Are AI-generated graphs accurate if they use the original dataset?

Not automatically. Incorrect variable selection, missing-data handling, aggregation, or graphical mappings can produce misleading figures even when the source data are authentic.

Should researchers use AI image generators or plotting code for statistical graphs?

For empirical numerical results, reproducible plotting code is generally preferable because it maintains an inspectable relationship between data and graphical elements. Unconstrained image generation may invent or distort values.

Can AI calculate means and confidence intervals for research graphs?

AI-assisted computational tools can perform these calculations, but researchers should verify formulas, sample sizes, assumptions, and the study design before accepting the results.

How can researchers verify an AI-generated research graph?

Inspect the data used by the plotting function, compare numerical values with verified analyses, and check axes, labels, scales, and uncertainty indicators.

Can AI-generated plotting code contain statistical errors?

Yes. Code may execute successfully while using incorrect variables, formulas, filters, or assumptions. Reproducibility does not eliminate the need for verification.

Should researchers disclose AI assistance in creating graphs?

Researchers should follow applicable journal and institutional policies. Consequential AI-assisted analytical procedures should be documented sufficiently for evaluation and reproducibility.

Can AI create accurate figures from confidential research datasets?

Technically, yes, within an appropriately authorized analytical environment. Researchers must ensure that data processing complies with participant consent, ethics approval, privacy protections, and institutional requirements.

09 · The Bottom Line

An Accurate Figure Requires an Accurate Path From Data to Display

The Bottom Line

Generative AI can create accurate figures from raw research data, but only when the data, calculations, and graphical mappings are correctly specified and verified. Direct access to a dataset does not guarantee that the resulting visualization represents the intended scientific evidence.

Use reproducible plotting procedures, inspect the exact values supplied to the graph, and verify the final visual against the original research records. The credibility of a figure depends not on how efficiently AI produced it, but on whether every graphical element can be defended using the underlying data.

10 · Sources and Further Reading

Methodological Sources on Reproducible and Accurate Research Visualization

11 · Cite this Guide

How to Cite This Guide

This guide is intended to be read, shared, and used in research, teaching, and academic work. If you draw on its ideas, explanations, or other content, please acknowledge the source by citing the guide. Doing so gives appropriate credit and helps your readers locate the original resource.

Has the Field Guide helped your research?

If a guide helped clarify a question, inform a research decision, or move your work forward, I would love to hear about your experience. Your story may also help other researchers discover the Field Guide.

Share Your Experience
Takes only a few minutes