\documentclass{article}
\usepackage[scheme=plain]{ctex}
\usepackage{pgfplots}
\usetikzlibrary{arrows.meta}
\tikzset{>={Stealth[scale=1.4]}}
\pgfplotsset{compat=latest,
sdt/.style={
ymin=460, ymax=620,
ytick distance=20,
xmin=34, xmax=56,
xtick={34,36,...,56},
axis lines =left,
tick align=inside,
tick style={black,major tick length=3},
tick label style={font=\footnotesize},
enlarge y limits={upper, abs value=6mm},
enlarge x limits={upper, abs value=10mm},
font=\small,
scatter/use mapped color={draw=black},
xlabel={年宣传费/千元},ylabel={年销售量/t},
xlabel style={at={(0.5,-0.06)},below,font=\kaishu\small},
ylabel style={at={(-0.08,0.5)},font=\kaishu\small},
every outer x axis line/.append style={->,red},
every outer y axis line/.append style={->,red},
}}
\begin{document}
\centering
\begin{tikzpicture}
\begin{axis}[sdt]
\addplot[scatter,only marks] coordinates {%
(38,500) (40,540) (44,560) (46,570) (48,580) (50,590) (56,600)};
\end{axis}
\end{tikzpicture}
\end{document}
问 关于pgfplots绘制散点图的一个问题