答案1
使用 PSTricks 的紧急专用解决方案。使用latex-dvips-ps2pdf
或进行编译xelatex
。
\documentclass[pstricks]{standalone}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}(-1,-1)(4.5,3.5)
\psaxes[labels=none,ticks=none]{->}(0,0)(-.5,-.5)(4,3)[$x$,0][$y$,90]
\pnodes{A}(1,1)(3,2)
\psset{linestyle=dashed,dash=4pt 1pt,arrows=o-o}
\psline(0,0|A0)(A0)(A0|0,0)
\psline(0,0|A1)(A1)(A1|0,0)
\psset{fillstyle=solid,linestyle=solid}
\pscircle(A0){1.8pt}
\pscircle(A1){1.8pt}
\uput[0](A0){$(x,y)$}
\uput[0](A1){$(x',y')$}
\uput[180](0,0|A0){$y$}
\uput[180](0,0|A1){$yS_y$}
\uput[270](A0|0,0){$x$}
\uput[270](A1|0,0){$xS_x$}
\end{pspicture}
\end{document}
答案2
这可能是mfpic
包,MetaPost 程序的一个方便的接口。(或者 MetaPost 本身,但它会更冗长一些。)
先用 LaTeX 排版,再用 MetaPost 排版,然后再用 LaTeX 排版。
\documentclass[12pt, border=3mm]{standalone}
\usepackage[metapost]{mfpic}
\setlength{\mfpicunit}{1cm}
\opengraphsfile{\jobname}
\begin{document}
\begin{mfpic}[2]{-.5}{3}{-.5}{2.5}
\pointdef{M}(.5, 1)
\pointdef{N}(2, 1.75)
\dashed\lines{(\Mx, 0), \M, (0, \My)}
\dashed\lines{(\Nx, 0), \N, (0, \Ny)}
\doaxes{xy}
\pointfillfalse
\point[4bp]{(\Mx, 0), \M, (0, \My), (\Nx, 0), \N, (0, \Ny)}
\tlpointsep{3bp}
\tlabels{[tr](0, 0){$O$} [tc](\Mx, 0){$x$} [tc](\Nx, 0){$S_xx$} [tc](\xmax, 0){$X$}}
\tlabels{[cl](\Mx, \My){$(x, y)$} [cl](\Nx, \Ny){$(x', y')$}}
\tlabels{[cr](0, \My){$y$} [cr]{(0, \Ny)}{$S_yy$} [cr]{(0, \ymax)}{$Y$}}
\end{mfpic}
\closegraphsfile
\end{document}
答案3
以下是 Ti 的示例钾Z,在那里人们可以非常简约并且清洁
\documentclass[border=4mm, tikz]{standalone}
\tikzset{%
circ/.style = {%
draw, solid,
fill = white,
shape = circle,
inner sep = 1pt,
node contents =
}
}
\begin{document}
\begin{tikzpicture}
% Axes
\draw [->, thick] (0,-1) -- (0,3) node [right] {$y$};
\draw [->, thick] (-1,0) -- (4,0) node [below] {$x$};
%Coordinate lines and nodes
\draw [dashed] (0,1) node [circ, label = left:{$y$}] {}
-- (1,1) node [circ, label = right:{$(x,y)$}] {}
-- (1,0) node [circ, label = below:{$x$}] {};
\draw [dashed] (0,2) node [circ, label = left:{$S_y y$}] {}
-- (3,2) node [circ, label = right:{$(x',y')$}] {}
-- (3,0) node [circ, label = below:{$S_x x$}] {};
\end{tikzpicture}
\end{document}