剧情星座

剧情星座
\documentclass[a4paper]{article}
\usepackage[12pt]{extsizes} 
\usepackage{cmap}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{caption}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm,bindingoffset=0cm]{geometry}
\usepackage[unicode, pdftex, colorlinks=true, 
linkcolor = red
citecolor = green
filecolor = magenta
urlcolor = cyan]{hyperref}

\usepackage{colortbl}
\usepackage{setspace}



\usepackage{pgfplots} 
\pgfplotsset{compat = newest}


\begin{document}
    
    
    \begin{center}
    %\pgfplotsset{xmin = -2, xmax = 2, ymin = -2, ymax = 2}
        \begin{tikzpicture}[xscale=1.5, yscale=1.5]
            
            \begin{axis}[
                axis lines = middle,
                xmin = -2, xmax = 2,
                ymin = -2, ymax = 2,
                %title = Успеваемость, % Заголовок
                xlabel = {$ I $},
                ylabel = {$ Q $}, 
                xtick={-1, 0, 1}, 
                ytick={-1, 0, 1},   
                ]               

    \draw (0,0) circle (15mm);

            \end{axis}
        \end{tikzpicture}
        
    \end{center}
    
    
    
\end{document}

在此处输入图片描述

我无法绘制图表。有没有什么办法可以让它更简单一些?

答案1

砷钛矿Z 图绘制起来并不难。但是将所有图表放在一行会使图表太小(在我看来),所以我决定将带有图像的图组织成两行:

\documentclass[12pt]{article}

\usepackage[english,russian]{babel}
\usepackage{caption}
\usepackage[a4paper,
            margin=2cm]{geometry}

\usepackage[table]{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                chains,
                positioning,
                quotes}
\usepackage[skip=1ex]{subcaption}

\begin{document}

    \begin{figure}[ht]
    \centering
\tikzset{
    arr/.style = {-Straight Barb},
    dot/.style = {circle, fill, inner sep=2pt, outer sep=0pt,
                  node contents={} },
  every label/.style = {label distance=4pt,
                        font=\footnotesize, fill=white, inner sep=1.5pt},
every picture/.style = {scale=1.2}
        }
    \begin{subfigure}[t]{0.32\linewidth}
\hspace*{-4mm}\begin{tikzpicture}
% axis
\draw[arr]  (-2.8,0) -- (2.8,0) node[right] {$\Re$};
\draw[arr]  (0,-2.4) -- (0,2.4) node[above] {$\Im$};
% circle
\draw   (0,0) circle[radius=15mm];
\foreach \i [count=\j] in {00, 01, 11, 10}
{
\pgfmathsetmacro{\angle}{\j*90-45}
\node at (\angle:15mm) [dot, label=\angle:\i];
}
\end{tikzpicture}
\caption{QPSK}\label{subfig:qpsk}
    \end{subfigure}
 \hfil
    \begin{subfigure}[t]{0.32\linewidth}
\hspace*{-4mm}\begin{tikzpicture}
% axis
\draw[arr]  (-2.8,0) -- (2.8,0) node[right] {$\Re$};
\draw[arr]  (0,-2.4) -- (0,2.4) node[above] {$\Im$};
% circle
\draw   (0,0) circle[radius=15mm];
\foreach \i [count=\j] in {000, 001, 011, 010,
                           110, 111, 101, 100}
{
\pgfmathsetmacro{\angle}{\j*45}
\node at (\angle:15mm) [dot, label=\angle:\i];
}
\end{tikzpicture}
\caption{8-PSK}\label{subfig:8-psk}
    \end{subfigure}

    \begin{subfigure}[t]{0.32\linewidth}
 \begin{tikzpicture}
% axis
\draw[arr]  (-2.8,0) -- (2.8,0) node[right] {$\Re$};
\draw[arr]  (0,-2.4) -- (0,2.4) node[above] {$\Im$};
% circle
\draw   (0,0) circle[radius=15mm];
\foreach \i [count=\j] in {0000, 0001, 0011, 0010,
                           0111, 0101, 0110, 0100,
                           0000, 0001, 0011, 0010,
                           0111, 0101, 0110, 0100}
{
\pgfmathsetmacro{\angle}{\j*22.5}
\node at (\angle:15mm) [dot, label=\angle:\i];
}
\end{tikzpicture}
\caption{16-PSK}\label{subfig:8-psk}
    \end{subfigure}
 \hfil
    \begin{subfigure}[t]{0.32\linewidth}
\hspace*{-4mm}\begin{tikzpicture}
% axis
\draw[arr]  (-2.8,0) -- (2.8,0) node[right] {$\Re$};
\draw[arr]  (0,-2.4) -- (0,2.4) node[above] {$\Im$};
% 
\foreach \i [count=\j from -2] in {0111, 0011, 1011, 1111}
    \node at (\j+0.5,1.5) [dot, label=\i];
\foreach \i [count=\j from -2] in {0110, 0010, 1010, 1110}
    \node at (\j+0.5,0.5) [dot, label=\i];
\foreach \i [count=\j from -2] in {0100, 0000, 1000, 1100}
    \node at (\j+0.5,-0.5) [dot, label=\i];
\foreach \i [count=\j from -2] in {0101, 0001, 1001, 1101}
    \node at (\j+0.5,-1.5) [dot, label=\i];
\end{tikzpicture}
\caption{16-QAM}\label{subfig:8-psk}
    \end{subfigure}
%
\caption{Constellation diagrams}
    \end{figure}
\end{document}

在此处输入图片描述

相关内容