In the following figure I want to use legends, write $x$
labels etc.
When I use \begin{axis}
for these, figure becomes too large.
\begin{tikzpicture}[scale=12]
\draw [<->] (0,0.5) -- (0,0) -- (0.9,0);
\draw[black, dashed, domain=0:0.5] plot (\x, {0.25-0.5*\x});
\draw (0.053, 0.2234)--(0.1835,0.158)--(0.207,0.167)--(0.15,0.1853);
\draw[black, domain=0:0.5] plot (\x, {0.25-0.5*\x+ 0.5*\x *\x});
\draw[black, dashed, domain=0:0.5] plot (\x, {1.0+\x- 0.25*sqrt(13.0+20.0*\x +4.0*\x *\x)});
\draw ( 0.0, 0.284 )--( 0.01, 0.272 )--( 0.05, 0.227 )--( 0.054, 0.223)--(0.1, 0.178)--( 0.15, 0.136 )--(0.2, 0.101)--(0.25, 0.071 )--( 0.3, 0.047 )--( 0.35, 0.028 )--( 0.4, 0.011 )--( 0.45, 0.003 )--( 0.49, 0.0 );
\draw [color=black, fill=gray!50] (0,0.25) -- (0,0.284) -- (0.052,0.225) -- cycle;
\draw [color=black, fill=gray!50] (0.053,0.2234) -- (0.1835,0.158) -- (0.207,0.167) --(0.15,0.1853)-- cycle;
%\draw (0.4,-0.1) node{ Value of $x$};
\end{tikzpicture}
axis
environment is provided by the PGFplots package, which makes it much easier to draw plots with axes, labels, legends etc. than doing all those things "by hand" in TikZ. Can you explain in a little more detail what you mean by "figure becomes too large", and what your question is exactly?{}
) while editing your question or answer. Also you can use ticks around the code inline as Jake did in your question around $x$ with `$x$`. So they are printed as$x$
. One last detail is pinging a user when you are replying, you can put an@
character, the type the few letters of the nickname and press the TAB key, the system will auto complete the name for you and it will ping the user you refer.