我正在嘗試繪製情節f(x)=sin(1/x)與pgfplot
,但我收到一條錯誤訊息:
! TeX 容量超出,抱歉 [主記憶體大小=3000000]。
%!!!
我意識到,當我刪除程式碼中標記的一個包時,一切都正常了。這是log
- 文件。
出了什麼問題?
\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}
先謝謝了!