I would advocate using the pgfplots package for this type of graphic.
It allows you to use the following, for example
\begin{tikzpicture}
\begin{axis}
\addplot[timtam]expression[domain=-3.5:3.5]{sin(x)};
\end{axis}
\end{tikzpicture}
Here's a couple of demonstrations; adjust as you see fit. For reference, see also Axis with trigonometric labels in PGFPlots, for example.

option 1 : using minipages, and individual plots
% arara: pdflatex
\documentclass{article}
\usepackage{geometry}
\usepackage{pgfplots}
\pgfplotsset{
% framing the graphs
framed/.style={
axis background/.style ={draw=blue,fill=yellow!20,rounded corners=3ex}},
% line style
timtam/.style={
color=red,mark=none,line width=1pt},
% every axis
every axis/.append style={
axis x line=middle, % put the x axis in the middle
axis y line=middle, % put the y axis in the middle
axis line style={->}, % arrows on the axis
xlabel={$x$}, % default put x on x-axis
ylabel={$y$}, % default put y on y-axis
scale only axis, % otherwise width won't be as intended: http://tex.stackexchange.com/questions/36297/pgfplots-how-can-i-scale-to-text-width
xtick={-3.14159265359,-1.57079632679,1.57079632679,3.14159265359},
xticklabels={$-\pi$,$-\pi/2$,$\pi/2$,$\pi$},
xmin=-3.5, xmax=3.5,
ymin=-2.3, ymax=2.3,
trig format=rad, % use radians
framed,
grid=both,
width=\textwidth,
},
% not needed in the below, but you might like them for future
asymptote/.style={
color=red,mark=none,line width=1pt,dashed},
soldot/.style={
color=red,only marks,mark=*},
holdot/.style={
color=red,fill=white,only marks,mark=*},
}
% arrow style
\tikzset{>=stealth}
\begin{document}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}
\addplot[timtam]expression[domain=-3.5:3.5]{sin(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}
\addplot[timtam]expression[domain=-3.5:3.5]{cos(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}
\addplot[timtam]expression[domain=-4.5:-1.58]{tan(x)};
\addplot[timtam]expression[domain=-1.56:1.55]{tan(x)};
\addplot[timtam]expression[domain=1.58:4.5]{tan(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}%
\vspace{1cm}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}
\addplot[timtam]expression[domain=-3.5:-3.2]{1/sin(x)};
\addplot[timtam]expression[domain=-3.1:-0.1]{1/sin(x)};
\addplot[timtam]expression[domain=0.1:3.1]{1/sin(x)};
\addplot[timtam]expression[domain=3.2:4.5]{1/sin(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}
\addplot[timtam]expression[domain=-4.5:-1.58]{1/cos(x)};
\addplot[timtam]expression[domain=-1.56:1.56]{1/cos(x)};
\addplot[timtam]expression[domain=1.58:4.5]{1/cos(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}
\addplot[timtam]expression[domain=-3.5:-3.2]{cot(x)};
\addplot[timtam]expression[domain=-3.1:-0.1]{cot(x)};
\addplot[timtam]expression[domain=0.1:3.1]{cot(x)};
\addplot[timtam]expression[domain=3.2:4.5]{cot(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}%
\end{document}
option 2: just like option 1, but with titles
If you'd like to add titles, we can use the following, for example; you'll see that the new part to the above is
title style={at={(axis cs:0,-3.2)}}, %<------ NEW BIT
and then, within the code, I've used \begin{axis}[title={$y=\sin(x)$}].

% arara: pdflatex
\documentclass{article}
\usepackage{geometry}
\usepackage{pgfplots}
\pgfplotsset{
% framing the graphs
framed/.style={
axis background/.style ={draw=blue,fill=yellow!20,rounded corners=3ex}},
% line style
timtam/.style={
color=red,mark=none,line width=1pt},
% every axis
every axis/.append style={
axis x line=middle, % put the x axis in the middle
axis y line=middle, % put the y axis in the middle
axis line style={->}, % arrows on the axis
xlabel={$x$}, % default put x on x-axis
ylabel={$y$}, % default put y on y-axis
scale only axis, % otherwise width won't be as intended: http://tex.stackexchange.com/questions/36297/pgfplots-how-can-i-scale-to-text-width
xtick={-3.14159265359,-1.57079632679,1.57079632679,3.14159265359},
xticklabels={$-\pi$,$-\pi/2$,$\pi/2$,$\pi$},
xmin=-3.5, xmax=3.5,
ymin=-2.3, ymax=2.3,
trig format=rad, % use radians
framed,
grid=both,
width=\textwidth,
title style={at={(axis cs:0,-3.2)}}, %<------ NEW BIT
},
% not needed in the below, but you might like them for future
asymptote/.style={
color=red,mark=none,line width=1pt,dashed},
soldot/.style={
color=red,only marks,mark=*},
holdot/.style={
color=red,fill=white,only marks,mark=*},
}
% arrow style
\tikzset{>=stealth}
\begin{document}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}[title={$y=\sin(x)$}]
\addplot[timtam]expression[domain=-3.5:3.5]{sin(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}[title={$y=\cos(x)$}]
\addplot[timtam]expression[domain=-3.5:3.5]{cos(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}[title={$y=\tan(x)$}]
\addplot[timtam]expression[domain=-4.5:-1.58]{tan(x)};
\addplot[timtam]expression[domain=-1.56:1.55]{tan(x)};
\addplot[timtam]expression[domain=1.58:4.5]{tan(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}%
\vspace{1cm}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}[title={$y=\csc(x)$}]
\addplot[timtam]expression[domain=-3.5:-3.2]{1/sin(x)};
\addplot[timtam]expression[domain=-3.1:-0.1]{1/sin(x)};
\addplot[timtam]expression[domain=0.1:3.1]{1/sin(x)};
\addplot[timtam]expression[domain=3.2:4.5]{1/sin(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}[title={$y=\sec(x)$}]
\addplot[timtam]expression[domain=-4.5:-1.58]{1/cos(x)};
\addplot[timtam]expression[domain=-1.56:1.56]{1/cos(x)};
\addplot[timtam]expression[domain=1.58:4.5]{1/cos(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{.33\textwidth}
\begin{tikzpicture}
\begin{axis}[title={$y=\cot(x)$}]
\addplot[timtam]expression[domain=-3.5:-3.2]{cot(x)};
\addplot[timtam]expression[domain=-3.1:-0.1]{cot(x)};
\addplot[timtam]expression[domain=0.1:3.1]{cot(x)};
\addplot[timtam]expression[domain=3.2:4.5]{cot(x)};
\end{axis}
\end{tikzpicture}
\end{minipage}%
\end{document}
option 3: using groupplot
The output is as in option 2, but the input is, perhaps, more pleasing; note that this requires the groupplots library, annotated in the code below.
% arara: pdflatex
\documentclass{article}
\usepackage{geometry}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots} %<------------ NEW BIT
\pgfplotsset{
% framing the graphs
framed/.style={
axis background/.style ={draw=blue,fill=yellow!20,rounded corners=3ex}},
% line style
timtam/.style={
color=red,mark=none,line width=1pt},
% every axis
every axis/.append style={
axis x line=middle, % put the x axis in the middle
axis y line=middle, % put the y axis in the middle
axis line style={->}, % arrows on the axis
xlabel={$x$}, % default put x on x-axis
ylabel={$y$}, % default put y on y-axis
scale only axis, % otherwise width won't be as intended: http://tex.stackexchange.com/questions/36297/pgfplots-how-can-i-scale-to-text-width
xtick={-3.14159265359,-1.57079632679,1.57079632679,3.14159265359},
xticklabels={$-\pi$,$-\pi/2$,$\pi/2$,$\pi$},
xmin=-3.5, xmax=3.5,
ymin=-2.3, ymax=2.3,
trig format=rad, % use radians
framed,
grid=both,
width=\textwidth,
title style={at={(axis cs:0,-3.2)}},
},
% not needed in the below, but you might like them for future
asymptote/.style={
color=red,mark=none,line width=1pt,dashed},
soldot/.style={
color=red,only marks,mark=*},
holdot/.style={
color=red,fill=white,only marks,mark=*},
}
% arrow style
\tikzset{>=stealth}
\begin{document}
\begin{tikzpicture}
\begin{groupplot}[
group style={
group name=my plots,
group size=3 by 2,
},
width=.33\textwidth,
]
\nextgroupplot[title={$y=\sin(x)$}]
\addplot[timtam]expression[domain=-3.5:3.5]{sin(x)};
\nextgroupplot[title={$y=\cos(x)$}]
\addplot[timtam]expression[domain=-3.5:3.5]{cos(x)};
\nextgroupplot[title={$y=\tan(x)$}]
\addplot[timtam]expression[domain=-4.5:-1.58]{tan(x)};
\addplot[timtam]expression[domain=-1.56:1.55]{tan(x)};
\addplot[timtam]expression[domain=1.58:4.5]{tan(x)};
\nextgroupplot[title={$y=\csc(x)$}]
\addplot[timtam]expression[domain=-3.5:-3.2]{1/sin(x)};
\addplot[timtam]expression[domain=-3.1:-0.1]{1/sin(x)};
\addplot[timtam]expression[domain=0.1:3.1]{1/sin(x)};
\addplot[timtam]expression[domain=3.2:4.5]{1/sin(x)};
\nextgroupplot[title={$y=\sec(x)$}]
\addplot[timtam]expression[domain=-4.5:-1.58]{1/cos(x)};
\addplot[timtam]expression[domain=-1.56:1.56]{1/cos(x)};
\addplot[timtam]expression[domain=1.58:4.5]{1/cos(x)};
\nextgroupplot[title={$y=\cot(x)$}]
\addplot[timtam]expression[domain=-3.5:-3.2]{cot(x)};
\addplot[timtam]expression[domain=-3.1:-0.1]{cot(x)};
\addplot[timtam]expression[domain=0.1:3.1]{cot(x)};
\addplot[timtam]expression[domain=3.2:4.5]{cot(x)};
\end{groupplot}
\end{tikzpicture}
\end{document}
If you need to number/reference the figures, then I'd recommend using the \caption command, perhaps employing the subfigure package.
geometrypackge. – leandriis Jan 09 '21 at 11:48