- #1
karush
Gold Member
MHB
- 3,269
- 5
as you see from %[scale=0.8]
I tried to scale the picture but it didn't after removing the %
\begin{tikzpicture}%[scale=0.8]
[declare function = {
tilde_y(\q) = sign(\q)*sqrt(abs(\q) / (1 - (abs(\q)-3)^3));},
pics/coordinates/.style args={(#1,#2),(#3,#4)}{ code={
%\draw[help lines] (#1,#2) grid (#3,#4);
\draw[-latex] (#1,0) -- (#3,0);
\draw[-latex] (0,#2) -- (0,#4);
%\node foreach \i in {#1,...,#3} at (\i,-0.1) [ below ] {$\i$};
%\node foreach \i in {#2,...,#4} at (-0.1,\i) [ left ] {$\i$};
}},
every node/.style={fill=black!5},
fill=black!5,]
\pic {coordinates={(-3,-2),(3,4)}};
\begin{scope}[draw=blue, ultra thick]
\draw[domain=-3.5:3.5, variable=\q, smooth] plot ({(abs(\q) - 3) * tilde_y(\q)}, {1 + tilde_y(\q)});
\filldraw foreach \p in {(1,3),(-1,2),(1,0),(-1,-1)} { \p circle (0.06) };
\end{scope}
\end{tikzpicture}
I tried to scale the picture but it didn't after removing the %
\begin{tikzpicture}%[scale=0.8]
[declare function = {
tilde_y(\q) = sign(\q)*sqrt(abs(\q) / (1 - (abs(\q)-3)^3));},
pics/coordinates/.style args={(#1,#2),(#3,#4)}{ code={
%\draw[help lines] (#1,#2) grid (#3,#4);
\draw[-latex] (#1,0) -- (#3,0);
\draw[-latex] (0,#2) -- (0,#4);
%\node foreach \i in {#1,...,#3} at (\i,-0.1) [ below ] {$\i$};
%\node foreach \i in {#2,...,#4} at (-0.1,\i) [ left ] {$\i$};
}},
every node/.style={fill=black!5},
fill=black!5,]
\pic {coordinates={(-3,-2),(3,4)}};
\begin{scope}[draw=blue, ultra thick]
\draw[domain=-3.5:3.5, variable=\q, smooth] plot ({(abs(\q) - 3) * tilde_y(\q)}, {1 + tilde_y(\q)});
\filldraw foreach \p in {(1,3),(-1,2),(1,0),(-1,-1)} { \p circle (0.06) };
\end{scope}
\end{tikzpicture}
Last edited: