Skip to main content
Notice removed Reward existing answer by Raaja_is_at_topanswers.xyz
Bounty Ended with Jake's answer chosen by Raaja_is_at_topanswers.xyz
Notice added Reward existing answer by Raaja_is_at_topanswers.xyz
Bounty Started worth 500 reputation by Raaja_is_at_topanswers.xyz
Notice removed Reward existing answer by 1010011010
Bounty Ended with Jake's answer chosen by 1010011010
Notice added Reward existing answer by 1010011010
Bounty Started worth 50 reputation by 1010011010
Notice removed Reward existing answer by MYaseen208
Bounty Ended with Jake's answer chosen by MYaseen208
Notice added Reward existing answer by MYaseen208
Bounty Started worth 200 reputation by MYaseen208
Tweeted twitter.com/#!/StackTeX/status/403146025076293632
added 118 characters in body
Source Link
MYaseen208
  • 8.7k
  • 17
  • 78
  • 154

I want to reproduce the following diagram in Tikz.

enter image description here

LaTeX code of my MWE is below:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}

\draw [-latex, thick] (0, 0) -- (0, 6) node  [above] {\Large{$e$}};
\draw [-latex, thick] (0, 3) -- (6, 3) node  [right] {\Large{$\widehat{Y}$}};

\draw [thick] (0, 0.5) -- (5, 4);
\draw [thick] (0, 1.75) -- (5, 5.25);

\end{tikzpicture}

\end{document}

enter image description here

I wonder how to fill specified area by dotted points. Any help will be highly appreciated. Thanks

Edited

How about this one?

enter image description here

I want to reproduce the following diagram in Tikz.

enter image description here

LaTeX code of my MWE is below:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}

\draw [-latex, thick] (0, 0) -- (0, 6) node  [above] {\Large{$e$}};
\draw [-latex, thick] (0, 3) -- (6, 3) node  [right] {\Large{$\widehat{Y}$}};

\draw [thick] (0, 0.5) -- (5, 4);
\draw [thick] (0, 1.75) -- (5, 5.25);

\end{tikzpicture}

\end{document}

enter image description here

I wonder how to fill specified area by dotted points. Any help will be highly appreciated. Thanks

I want to reproduce the following diagram in Tikz.

enter image description here

LaTeX code of my MWE is below:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}

\draw [-latex, thick] (0, 0) -- (0, 6) node  [above] {\Large{$e$}};
\draw [-latex, thick] (0, 3) -- (6, 3) node  [right] {\Large{$\widehat{Y}$}};

\draw [thick] (0, 0.5) -- (5, 4);
\draw [thick] (0, 1.75) -- (5, 5.25);

\end{tikzpicture}

\end{document}

enter image description here

I wonder how to fill specified area by dotted points. Any help will be highly appreciated. Thanks

Edited

How about this one?

enter image description here

Source Link
MYaseen208
  • 8.7k
  • 17
  • 78
  • 154

Filling specified area by random dots in TikZ

I want to reproduce the following diagram in Tikz.

enter image description here

LaTeX code of my MWE is below:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}

\draw [-latex, thick] (0, 0) -- (0, 6) node  [above] {\Large{$e$}};
\draw [-latex, thick] (0, 3) -- (6, 3) node  [right] {\Large{$\widehat{Y}$}};

\draw [thick] (0, 0.5) -- (5, 4);
\draw [thick] (0, 1.75) -- (5, 5.25);

\end{tikzpicture}

\end{document}

enter image description here

I wonder how to fill specified area by dotted points. Any help will be highly appreciated. Thanks