The diagram that I would like to reproduce using tikz/pgfplots is given below:
I tried to do it but I did not succeed (I am new to pgfplots and tikz). Here is my code and my output file. For example, I could not plot a circle (which could be easier than an ellipse), etc. Can you please help me?
My code (some of my code are from this site):
\documentclass[margin=3mm]{standalone}
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage{amsfonts}
\usetikzlibrary{patterns}
\usepackage{ellipsis}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathreplacing,decorations.markings,shapes.geometric}
\tikzset{naming/.style={align=center,font=\small}}
\tikzset{antenna/.style={insert path={-- coordinate (ant#1) ++(0,0.25) -- +(135:0.25) + (0,0) -- +(45:0.25)}}}
\tikzset{station/.style={naming,draw,shape=dart,shape border rotate=90, minimum width=2mm, minimum height=2mm,outer sep=0pt,inner sep=1pt}}
%\tikzset{mobile/.style={naming,draw,shape=rectangle,minimum width=15mm,minimum height=7.5mm, outer sep=0pt,inner sep=3pt}}
\tikzset{mobile/.style={naming,draw,shape=rectangle,minimum width=2mm,minimum height=2mm, outer sep=0pt,inner sep=1pt}}
\tikzset{radiation/.style={{decorate,decoration={expanding waves,angle=90,segment length=4pt}}}}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines=none,
]
\addplot[] coordinates {
(1,1) (4,1) (6,1) (8,1)
};
\addplot[] coordinates {
(1,6) (4,6) (6,6) (8,6)
};
\addplot[] coordinates {
(8,1) (10,3.5)
};
\addplot[] coordinates {
(8,6) (10,3.5)
};
\addplot[] coordinates {
(1,1) (-1,3.5)
};
\addplot[] coordinates {
(1,6) (-1,3.5)
};
\draw \pgfextra{\pgfpathellipse{
\pgfplotspointaxisxy{3}{3}}
{\pgfplotspointaxisdirectionxy{1}{0}}
{\pgfplotspointaxisdirectionxy{0}{1}}
};
\draw \pgfextra{\pgfpathellipse{
\pgfplotspointaxisxy{7}{4.5}}
{\pgfplotspointaxisdirectionxy{0}{1}}
{\pgfplotspointaxisdirectionxy{1}{0}}
};
\draw \pgfextra{\pgfpathellipse{
\pgfplotspointaxisxy{3}{5}}
{\pgfplotspointaxisdirectionxy{-1}{1}}
{\pgfplotspointaxisdirectionxy{2}{0}}
};
\node[minimum size=0.1cm,station,fill=black] at (40, 200) (SBS1) {};
\node[minimum size=0.1cm,station,fill=gray] at (80, 320) (SBS2) {};
\node[minimum size=0.1cm,station,fill=black,pattern=grid] at (40, 400) (SBS3) {};
\node[minimum size=0.1cm,mobile,fill=black,pattern=grid] at (25, 460) (SU3) {};
\node[minimum size=0.1cm,mobile,fill=gray] at (80, 400) (SU2) {};
\node[minimum size=0.1cm,mobile,fill=black] at (35, 250) (SU1) {};
\draw[] (SBS1) node[xshift=1cm] {} -> (SU1);
\draw[] (SBS2) node[color=gray,xshift=1cm] {} -> (SU2);
\draw[] (SBS3) node[color=gray,xshift=1cm] {} -- (SU3);
\draw[dashed] (SBS1) node[color=gray,xshift=1cm] {} -- (SU2);
\draw[dashed] (SBS1) node[color=gray,xshift=1cm] {} -- (SU3);
\draw[dashed] (SBS2) node[color=gray,xshift=1cm] {} -- (SU1);
\draw[dashed] (SBS2) node[color=gray,xshift=1cm] {} -- (SU3);
\draw[dashed] (SBS3) node[color=gray,xshift=1cm] {} -- (SU1);
\draw[dashed] (SBS3) node[color=gray,xshift=1cm] {} -- (SU2);
\end{axis}
\end{tikzpicture}
\end{document}
Best Answer
I guess this should get you started...