我正在尝试绘制f(x)= sin(1/x)使用pgfplot
,但我收到一条错误消息:
!TeX 容量超出,抱歉 [主内存大小=3000000]。
%!!!
我意识到,当我删除代码中标有的其中一个包时,一切都正常了。这是log
-file。
出了什么问题?
\documentclass[a4paper,11pt,twoside]{book}
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage[english,greek]{babel}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}%!!!
\usepackage{mathtools}%!!!
\usepackage{subcaption}%!!!
\usepackage[most]{tcolorbox}%!!!
\usepackage{fancybox}%!!!
\usepackage{wasysym}%!!!
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usepackage{tikz}
\usetikzlibrary{shapes,snakes}%!!!
\usetikzlibrary{shadows.blur}%!!!
\usetikzlibrary{decorations.text}%!!!
\usetikzlibrary{calc,patterns,angles,quotes,decorations.pathreplacing}%!!!
\usetikzlibrary{spy}%!!!
\usetikzlibrary{positioning,shapes,fit,arrows}%!!!
\begin{document}
\begin{center}
\begin{tikzpicture}[>=latex]
\begin{axis}[
axis x line=center,
axis y line=center,
xlabel={$x$},
ylabel={$y$},
xlabel style={below right},
ylabel style={above left},
xmin=-1.5,
xmax=1.5,
ymin=-1.2,
ymax=1.2,
ticks=none,
height=0.3\textwidth,
width=0.6\textwidth,]
\addplot[domain=0.01:1.5, thin,samples=5000] {sin(deg(1/(x)))};
\addplot[domain=-1.5:-0.01, thin,samples=5000] {sin(deg(1/(x)))};
\node at (axis cs:1.4,0.8) {$C_f$} ;
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}
先谢谢了!!!