\documentclass{standalone}
\standaloneconfig{border=2mm 2mm 2mm 2mm}
%maths
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
%tikzpicture
\usepackage{tikz}
\usepackage{scalerel}
\usepackage{pict2e}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\usetikzlibrary{patterns, arrows.meta}
\usetikzlibrary{shadows}
\usetikzlibrary{external}
%pgfplots
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{statistics}
\usepgfplotslibrary{fillbetween}
%colours
\usepackage{xcolor}
\usepackage{nicefrac}
\begin{document}
%\begin{tikzpicture}
%\draw[lightgray] (0,0) grid (5,5);
%\draw[ultra thick] (1,1) --(4,3);
%\draw[thick] (1,1) -- (4,3);
%\draw (1,1) -- (4,3);
%\draw[->] (1,1) -- (4,3);
%\draw[<-] (1,1) --(4,3);
%\draw[<->] (1,1)-- (4,3);
%\draw[-Stealth] (1,1) -- (4,3);
%\draw[Stealth-] (1,1) -- (4,3);
%\draw[Stealth-Stealth] (1,1)--(4,3);
%\draw[Stealth-{Stealth[scale=2]}] (1,1) -- (4,3);
%\draw[Circle-{Stealth[scale=2]}] (1,1) -- (4,3);
%\draw[{Circle[scale=2, open]}-{Stealth[scale=2]}] (1,1) -- (4,3);
%\draw[{Circle[scale=2,open]}-{Stealth[scale=2]}] (1,1) -- (4,3) node{$\mathbf{a}$};
%\draw[{Circle[scale=2,open]}-{Stealth[scale=2]}] (1,1) -- (4,3) node[midway]{$\mathbf{a}$};
%\draw[{Circle[scale=2, open]}-{Stealth[scale=2]}] (1,1) -- (4,3) node[midway, above left]{$\mathbf{a}$};
%\draw[{Circle[scale=2, open]}-{Stealth[scale=2]}] (1,1) -- (4,3) node[midway, above left=10pt]{$\mathbf{a}$};
%\draw[{Circle[scale=2, open]}-{Stealth[scale=2]}] (1,1) -- (4,3) node[rotate=180, midway, above left=15pt]{$\mathbf{a}$};
%\draw (1,1) circle [radius=1];
%\draw (1,1) -- (2,1) -- (2,2) -- (1,2) -- (1,1);
%\draw (1,1) rectangle (2,2);
%\fill [blue] (1,1) rectangle (2,2);
%\draw (1,1) circle [radius=0.1];
%\fill (1,1) circle [radius=0.1];
%\fill[gray] (1,1) circle [radius=0.1];
%\draw (1,1) -- (2,1) -- (2,2) -- (1,2) -- (1,1);
%\coordinate (A) at (3,3);
%\draw[ultra thick,->] (A) arc (30:90:2); %draw (A) arc (Start Angle:End Angle:Radius)
%\end{tikzpicture}
%\begin{tikzpicture}[scale=1.5]
% %Venn Diagrams 4/8 Maths Partner
% %\draw [lightgray] (-3,-3) grid (3,3);
% \coordinate (C1) at (0,0);
% \coordinate (C2) at (1.5,0);
% \coordinate (C3) at (0.75,-1.5);
% \coordinate (R1) at (-1.75, -3.25);
% \coordinate (R2) at (3.25, 1.75);
%
% \draw (C1) circle (1.25);
% \draw (C2) circle (1.25);
% \draw (C3) circle (1.25);
%
% \draw (R1) rectangle (R2);
%
% \coordinate [label=left:$\xi$] (R) at (-1.75,1.5);
% \coordinate [label=above left:\textbf{Rugby}] (A) at (-0.5,1.1);
% \coordinate [label=above right:\textbf{Football}] (B) at (1.8,1.2);
% \coordinate [label=below:\textbf{Cricket}] (C) at (0.75,-2.8);
%
% \clip (C1) circle (1.25);
% \fill (C2) circle (1.25);
%\end{tikzpicture}
%%Probability Trees
%\begin{tikzpicture}
% \coordinate [label=right:\textbf{\underline{Colour}}] (Lable1) at (0,3);
% \coordinate[label=right:\textbf{\underline{State}}] (Label2) at (3.5,3);
%
% \coordinate (O) at (0,0);
%
% \coordinate [label=right: White] (A0) at (2,1.5);
% \coordinate [label=right: Black] (B0) at (2,-1.5);
%
% \draw (O) -- (A0) node[midway, above left]{$\nicefrac{20}{50}$};
% \draw (O) -- (B0) node[midway, below left]{$\nicefrac{30}{50}$};
%
% \coordinate (A1) at (3.2,1.5);
% \coordinate (B1) at (3.2,-1.5);
%
% \coordinate [label=right: Clean] (AA1) at (5,2);
% \coordinate [label=right: Dirty] (AB1) at (5,1);
%
% \draw (A1) -- (AA1) node[midway, above]{$\nicefrac{15}{20}$};
% \draw (A1) -- (AB1) node[midway, below]{$\nicefrac{5}{20}$};
%
% \coordinate [label=right: Clean] (BA1) at (5,-1);
% \coordinate [label=right: Dirty] (BB1) at (5,-2);
%
% \draw (B1) -- (BA1) node[midway, above]{$\nicefrac{5}{30}$};
% \draw (B1) -- (BB1) node[midway, below]{$\nicefrac{25}{30}$};
%
%\end{tikzpicture}
%%6 of 8:Plotting Graphs
%\pgfplotsset{
% standard/.style={
% axis line style =thick,
% trig format=rad,
% enlargelimits,
% axis x line=middle,
% axis y line=middle,
% enlarge x limits=0.15,
% enlarge y limits=0.15,
% every axis x label/.style={at={(current axis.right of origin)},anchor=north west},
% every axis y label/.style={at={(current axis.above origin)},anchor=south east},
% grid=both,
% ticklabel style={font=\tiny,fill=white}
% }
%}
%
%\begin{tikzpicture}
% \begin{axis}[standard,
% xtick={1,2,3,4},
% ytick={1,2,4,8,16},
% xticklabels={$1$,$2$,$3$,$4$},
% yticklables={$1$,$2$,$4$,$8$,$16$},
% xlabel={Time $t$},
% ylabel={Size $y$},
% samples=1000,
% xmin=-0.5, xmax=5,
% ymin=-1, ymax=20]
%
% \node[anchor=center,label=south west:$O$] at (axis cs:0,0){};
% \addplot[line width=0.4mm, red, domain={0:5}]{2^x};
% \end{axis}
%
%\end{tikzpicture}
%7of8 : Shading Areas Between Graphs
\pgfplotsset{
standard/.style={
axis line style = thick,
trig format=rad,
enlargelimits,
axis x line=middle,
axis y line=middle,
enlarge x limits=0.15,
enlarge y limits=0.15,
every axis x label/.style={at={(current axis.right of origin)},anchor=north west},
every axis y label/.style={at={(current axis.above origin)},anchor=south east}
}
}
\begin{tikzpicture}
\begin{axis}[standard,
xtick={-0.3,0.2},
ytick=\empty,
samples=1000,
xlabel={$x$},
ylabel={$y$},
xmin=-0.52,xmax=0.4,
ymin=-0.05,ymax=0.55]
\node[anchor=center,label=south west:$O$] at (axis cs:0,0){};
\addplot[name path=F,domain={-0.5:0.38158}]{(sin(e^(3*x))*e^(3*x))/(cos(e^(3*x))+4)};
%\path[name path=xAxis] (axis cs:-0.3,0) -- (axis cs:0.2,0);
%\addplot[fill=black, fill opacity=0.2] fill between [of=F and xAxis, soft clip={domain=-0.3:0.2}];
\addplot[name path=G, domain={-0.5:0.38158}]{-x^2+0.5};
\addplot[fill=black, fill opacity=0.2] fill between [of=F and G, soft clip={domain=-0.3:0.2}];
\end{axis}
\end{tikzpicture}
%8of8: Downloading Transparent PNGs
\end{document}
Tikz and Pgfplot
반응형
반응형
최근댓글