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.