Grafici con Tikz numero 13 (funzioni)

Immagini matematica

Home » Grafici con Tikz numero 13 (funzioni)

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
post
page

Prima di ogni figura ricordare di mettere

\documentclass[usenames,dvipsnames]{article}
\usepackage{pgfplots}

Prima figura

Rendered by QuickLaTeX.com

codice prima figura

\begin{tikzpicture}
\def\centerarc[#1](#2)(#3:#4:#5) % Syntax: [draw options] (center) (initial angle:final angle:radius)
{ \draw[#1] ($(#2)+({#5*cos(#3)},{#5*sin(#3)})$) arc (#3:#4:#5); }
% Macro \centerarc presa da https://tex.stackexchange.com/a/66220
% Richiede \usetikzlibrary{calc}
\begin{axis}[
disabledatascaling,
axis equal image,
scale=0.70,
axis x line=none,
axis y line=none,
xmin = -0.7,
xmax = 0.7,
ymin = -0.7,
ymax = 0.7,
]
\draw[ultra thick,color=CornflowerBlue] (axis cs:0,0) circle[radius=1/sqrt(3)];
\addplot[no marks,very thick,SeaGreen] coordinates {(-0.289,-0.167) (0.289,0.167)};
\addplot[no marks,very thick,samples=10] coordinates {(-1/sqrt(3),0) (1/2/sqrt(3),-1/2) (1/2/sqrt(3),1/2) (-1/sqrt(3),0)} \closedcycle;
\addplot[no marks,very thick,samples=10,RubineRed] coordinates {(-0.408,-0.408) (0.408,0.408)};
\addplot[no marks,thick,samples=10,dashed,RubineRed] coordinates {(-1,-1) (1,1)};
% \addplot[mark=*,samples=10,mark size=1.5pt] coordinates {(-0.408,-0.408) (0.408,0.408)};
\addplot[no marks,very thick,samples=10,mark size=1.5pt] coordinates {(0,0) (1/2/sqrt(3),-1/2)};
\addplot[no marks,thick,dotted] coordinates {(0,0) (1/sqrt(3),0)};
\addplot[mark=*,mark size=1.5pt] coordinates {(0,0)} node[above left] {$O$};
\addplot[mark=*,mark size=1.5pt] coordinates {(-1/sqrt(3),0)} node[left] {$A$};
\addplot[mark=*,mark size=1.5pt] coordinates {(1/2/sqrt(3),-1/2)} node[below right] {$B$};
\addplot[mark=*,mark size=1.5pt] coordinates {(1/2/sqrt(3),1/2)} node[above right] {$C$};
\addplot[mark=*,mark size=1.5pt] coordinates {(1/2/sqrt(3),0)} node[below right] {$D$};
\addplot[mark=*,mark size=1.5pt,RubineRed] coordinates {(0.289,0.289)} node[right] {$P\rule{0pt}{10pt}$};
\addplot[mark=*,mark size=1.5pt,RubineRed] coordinates {(-0.211,-0.211)} node[below] {$Q\rule{0pt}{10pt}$};
\addplot[no marks] coordinates {(0.20,0.145)} node[below] {$\vartheta$};
\addplot[no marks] coordinates {(-0.144,0.25)} node[above left] {1};
\centerarc[thick](0,0)(0:45:0.11);
\centerarc[thick](0,0)(0:45:0.13);
\centerarc[thick]({1/2/sqrt(3)},-1/2)(90:120:0.13);
\centerarc[thick]({1/2/sqrt(3)},-1/2)(120:150:0.11);
\end{axis}
\end{tikzpicture}

seconda figura

Rendered by QuickLaTeX.com

codice seconda figura

\begin{tikzpicture}
\begin{axis}[
axis equal image,
disabledatascaling,
width=0.75\textwidth,
axis x line=none,
axis y line=none,
axis on top,
xmin = -0.5,
xmax = 3.5,
ymin = -0.3,
ymax = 1.5
]
\addplot[very thick,samples=10,no marks,fill=Apricot!30] coordinates {(0,0) (1,0) (0,1.272) (0,0)} \closedcycle;
\addplot[very thick,samples=10,no marks,fill=Magenta!30] coordinates {(2,0) (3,0) (2,0.786) (2,0)} \closedcycle;
\addplot[no marks,thick] coordinates {(0,0.1) (0.1,0.1) (0.1,0)};
\addplot[no marks,thick] coordinates {(2,0.1) (2.1,0.1) (2.1,0)};
\centerarc[thick](0,1.272)(-90:-52:0.2);
\centerarc[thick](2,0.786)(-90:-35:0.15);
\addplot[no marks] coordinates {(0,1.272)} node[above left] {$A$};
\addplot[no marks] coordinates {(0,0)} node[below left] {$B$};
\addplot[no marks] coordinates {(1,0)} node[below right] {$C$};
\addplot[no marks] coordinates {(2,0.786)} node[above left] {$A$};
\addplot[no marks] coordinates {(2,0)} node[below left] {$B$};
\addplot[no marks] coordinates {(3,0)} node[below right] {$C$};
\end{axis}
\end{tikzpicture}

terza figura

Rendered by QuickLaTeX.com

codice terza figura

\begin{tikzpicture}
\begin{axis}[
width=0.66\textwidth,
height=0.4\textwidth,
axis x line=center,
axis y line=center,
axis on top,
xmin = -0.25,
xmax = 2.9,
ymin = -0.5,
ymax = 2.9,
xlabel = {$b$},
ylabel = {$a$},
extra x ticks = {0},
extra x tick label = {$\hspace{-0.45cm}\phantom{/}O\phantom{/}$},
]
\addplot[very thick,samples=100,DarkOrchid,domain=0:2.5] {x^2};
\addplot[very thick,samples=100,SeaGreen,domain=0:2.5] {2^(-x)};
\addplot[mark=*,thick,mark options={fill=BurntOrange},mark size=3pt,draw=none] coordinates {(0.767,0.588)};
\addplot[no marks] coordinates {(1,2)} node[right] {$\color{DarkOrchid} b^2$};
\addplot[no marks] coordinates {(2,0.6)} node[right] {$\color{SeaGreen} 2^{-b}$};
\end{axis}
\end{tikzpicture}

quarta figura

Rendered by QuickLaTeX.com

codice quarta figura

\begin{tikzpicture}
\begin{axis}[
axis equal image,
scale=0.65,
axis x line=center,
axis y line=center,
xmin = -3.5,
xmax = 3.5,
ymin = -3.9,
ymax = 3.9,
xlabel = {$x$},
ylabel = {$y$},
xtick = {-pi,-pi/2,pi/2,pi},
xticklabels = {$\phantom{/}-$$\pi\phantom{/}$, $-$$\pi/2$,$\pi/2$, $\phantom{/}\pi\phantom{/}$},
extra x ticks = {0},
extra x tick label = {$\hspace{0.45cm}O$},
colormap={yellowpurple}{rgb255(0cm)=(240, 225, 48); rgb255(1cm)=(204, 204, 255)}
]
\addplot[very thick,samples=100,mesh,point meta=x,domain=-3.5:-1.6] {1/cos(deg(x))-1};
\addplot[very thick,samples=100,mesh,point meta=x,domain=-1.53:1.53] {1/cos(deg(x))-1};
\addplot[very thick,samples=100,mesh,point meta=x,domain=1.6:3.5] {1/cos(deg(x))-1};
\addplot[no marks] coordinates {(pi/3,-3)} node {\fbox{e}};
\end{axis}
\end{tikzpicture}

quinta figura

Rendered by QuickLaTeX.com

codice quinta figura

\begin{tikzpicture}
\begin{axis}[
width=0.75\textwidth,
height=0.5\textwidth,
axis x line=center,
axis y line=center,
axis on top,
xmin = -pi/6,
xmax = 7.5,
ymin = -1.4,
ymax = 1.4,
xlabel = {$x$},
ylabel = {$y$},
xtick = {pi/2,pi,3*pi/2,2*pi},
xticklabels = {$\pi/2$, $\phantom{/}\pi\phantom{/}$, $3\pi/2$, $\phantom{/}2\pi\phantom{/}$},
extra x ticks = {0},
extra x tick label = {$\hspace{-0.45cm}\phantom{/}O\phantom{/}$},
x tick label style={above},
domain=-pi:2.5*pi
]

\path[name path=below] (axis cs:0,-2) -- (axis cs:2*pi,-2);
\path[name path=above] (axis cs:0,+2) -- (axis cs:2*pi,2);
\addplot[Gray!10] fill between[of = below and above, soft clip={domain=0:2*pi}];
\addplot[very thick,samples=100,Emerald] {sin(deg(x))^3};
\addplot[very thick,samples=100,BurntOrange] {-cos(deg(x))^2};
\addplot[no marks,dashed] coordinates {(2*pi,-5) (2*pi,5)};
\addplot[mark=*,Purple,mark size=3pt,draw=none] coordinates {(3.997,-0.43) (5.428,-0.43)};
\addplot[no marks] coordinates {(2.1,1)} node[right] {$\color{Emerald} \sin^3(x)$};
\addplot[no marks] coordinates {(0.3,-1)} node[right] {$\color{BurntOrange} -\cos^2(x)$};
\end{axis}
\end{tikzpicture}