Latex画图

来源:互联网 发布:mac可以装谷歌浏览器吗 编辑:程序博客网 时间:2024/06/07 16:03

\documentclass[CJK]{cctart}
\usepackage{amsmath,amssymb,mathrsfs,amscd}
\usepackage{graphicx}

\begin{document}
\date{}

\begin{center}
\setlength{\unitlength}{1mm}
\begin{picture}(80, 40)

\put(5,10){\circle*{1}}
\put(25,10){\circle*{1}}
\put(15,20){\circle*{1}}
\put(5,30){\circle*{1}}
\put(25,30){\circle*{1}} %%以上是画点,(5,10)是点的坐标,最后的1是点的大小%%

\put(2,10){1}
\put(27,10){2}
\put(14,16){3}
\put(2,30){4}
\put(27,30){5}%%给5个点做标记,注意坐标和点错开%%

\put(5,10){\line(0,1){20}}
\put(5,10){\line(1,1){20}}
\put(25,10){\line(-1,1){20}}
\put(25,10){\line(0,1){20}} %%这四行是画直线,第一行相当于说从点(5,10)处画与向量(0,1)平行的直线,长度为20个单位%%

%%下面是另一个图,改变了斜率和点的大小%%

\put(45,10){\circle*{2}}
\put(75,10){\circle*{2}}
\put(60,20){\circle*{2}}
\put(45,30){\circle*{2}}
\put(75,30){\circle*{2}}

\put(45,10){\line(0,1){20}}
\put(45,10){\line(3,2){30}}
\put(75,10){\line(-3,2){30}}
\put(75,10){\line(0,1){20}}
\end{picture}
\end{center}

\begin{figure}[h!]
\begin{center}
\includegraphics[width=3 in]{0.jpg}
\caption{这是用鼠标画的图}
\end{center}
\end{figure}

\end{document}

原创粉丝点击