Skip to content

Instantly share code, notes, and snippets.

@tapyu
Last active April 25, 2024 21:10
Show Gist options
  • Save tapyu/1b43df523ff99dbbcbe921d98cc70931 to your computer and use it in GitHub Desktop.
Save tapyu/1b43df523ff99dbbcbe921d98cc70931 to your computer and use it in GitHub Desktop.
Personal Tikz/PGFplots gallery
SHELL := /usr/bin/zsh
PDF_FILES=$(wildcard *.pdf)
all:
for pdffile in $(PDF_FILES); do \
gs -dNOPAUSE -sDEVICE=jpeg -sOutputFile=$${pdffile/%pdf/jpg} -r200 -dBATCH $${pdffile}; \
rm -f $${pdffile}; \
done
@setopt +o nomatch; rm -f *.out *.aux *.alg *.acr *.dvi *.gls *.log *.bbl *.blg *.ntn *.not *.lof *.lot *.toc *.loa *.lsg *.nlo *.nls *.ilg *.ind *.ist *.glg *.glo *.xdy *.acn *.idx *.loq *.bcf *.fdb_latexmk *.fls *.xml *.gz *~ *.csv
\documentclass{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\pgfkeys{
/mycube/.cd,
width/.initial=1,
height/.initial=1,
depth/.initial=1,
color/.initial=black,
}
\newcommand{\mycube}[2][]{%
\pgfkeys{/mycube/.cd, #1}%
\begin{scope}[transform shape, tdplot_rotated_coords, shift={#2}]
\edef\color{\pgfkeysvalueof{/mycube/color}}
\edef\height{\pgfkeysvalueof{/mycube/height}}
\edef\width{\pgfkeysvalueof{/mycube/width}}
\edef\depth{\pgfkeysvalueof{/mycube/depth}}
\draw[fill=\color, opacity=0.5]
(0,0,0) -- ++(\width,0,0) -- ++(0,\height,0) -- ++(-\width,0,0) -- cycle;
\draw[fill=\color, opacity=0.5]
(0,0,0) -- ++(\width,0,0) -- ++(0,0,\depth) -- ++(-\width,0,0) -- cycle;
\draw[fill=\color, opacity=0.5]
(0,0,0) -- ++(0,0,\depth) -- ++(0,\height,0) -- ++(0,0,-\depth) -- cycle;
\draw[fill=\color, opacity=0.5]
(\width,0,0) -- ++(0,0,\depth) -- ++(0,\height,0) -- ++(0,0,-\depth) -- cycle;
\draw[fill=\color, opacity=0.5]
(0,\height,0) -- ++(\width,0,0) -- ++(0,0,\depth) -- ++(-\width,0,0) -- cycle;
\draw[fill=\color, opacity=0.5]
(0,0,\depth) -- ++(\width,0,0) -- ++(0,\height,0) -- ++(-\width,0,0) -- cycle;
\end{scope}
}
\begin{document}
\tdplotsetmaincoords{0}{0}%
\begin{tikzpicture}
[
tdplot_main_coords,
rotated axis/.style={->,black,thick},
cube/.style={very thick,black},
% grid/.style={very thin,gray},
% axis/.style={->,black,thick},
]
% % draw a grid in the x-y plane
% \foreach \x in {-0.5,0,...,2.5}
% \foreach \y in {-0.5,0,...,2.5}
% {
% \draw[grid, tdplot_rotated_coords] (\x,-0.5) -- (\x,2.5);
% \draw[grid, tdplot_rotated_coords] (-0.5,\y) -- (2.5,\y);
% }
%draw the rotated coordinate frame axes
\tdplotsetrotatedcoords{15}{-20}{-15}%
\draw[rotated axis, tdplot_rotated_coords] (0,0,0) -- (3.5,0,0) node[anchor=west]{Time};
\draw[rotated axis, tdplot_rotated_coords] (0,0,0) -- (0,1.5,0) node[anchor=south west]{Code};
\draw[rotated axis, tdplot_rotated_coords] (0,0,0) -- (0,0,3) node[anchor=north]{Frequency};
% % Switch back to main coordinates for additional elements
% \tdplotsetmaincoords{0}{0}%
% % Add more elements if needed in main coordinates
% \draw[axis,tdplot_main_coords] (0,0,0) -- (3,0,0) node[anchor=west]{$x$};
% \draw[axis,tdplot_main_coords] (0,0,0) -- (0,3,0) node[anchor=north west]{$y$};
% \draw[axis,tdplot_main_coords] (0,0,0) -- (0,0,3) node[anchor=west]{$z$};
\mycube[width=1, height=1, depth=2, color=blue]{(0,0,0)}
\mycube[width=1, height=1, depth=2, color=red]{(1,0,0)}
\mycube[width=1, height=1, depth=2, color=green]{(2,0,0)}
\end{tikzpicture}
\end{document}
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
colormap={bluewhite}{color=(white) rgb255=(90,96,191)},
xlabel=Predicted,
xlabel style={yshift=-30pt},
ylabel=Actual,
ylabel style={yshift=20pt},
xticklabels={Class 1, Class 2, Class 3}, % changed
xtick={0,...,2}, % changed
xtick style={draw=none},
yticklabels={Class 1, Class 2, Class 3}, % changed
ytick={0,...,2}, % changed
ytick style={draw=none},
enlargelimits=false,
colorbar,
xticklabel style={
rotate=00
},
nodes near coords={\pgfmathprintnumber\pgfplotspointmeta},
nodes near coords style={
yshift=-7pt
},
]
\addplot[
matrix plot,
mesh/cols=3, % changed
point meta=explicit, draw=gray
] table [meta=C] {
x y C
0 0 0.92494
1 0 0
2 0 0
0 1 0.03926
1 1 0.80664
2 1 0.02664
0 2 0.03580
1 2 0.19336
2 2 0.97336
};
% Add text in a specific position
\node[anchor=south, yshift={-20pt}] at (axis cs:0,0) {(1602)};
\node[anchor=south, yshift={-20pt}] at (axis cs:0,1) {(68)};
\node[anchor=south, yshift={-20pt}] at (axis cs:1,1) {(1506)};
\node[anchor=south, yshift={-20pt}] at (axis cs:2,1) {(32)};
\node[anchor=south, yshift={-20pt}] at (axis cs:0,2) {(62)};
\node[anchor=south, yshift={-20pt}] at (axis cs:1,2) {(361)};
\node[anchor=south, yshift={-20pt}] at (axis cs:2,2) {(1169)};
\end{axis}
\end{tikzpicture}
\end{document}
% features
% \foreach
% \let
% \begin{scope}
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots} % loads tikz which loads pgf
\usepackage[american,siunitx]{circuitikz}
\usetikzlibrary{arrows,calc,positioning,fit}
\pgfplotsset{
compat=1.15,
within block/.style={
scale only axis,
scale=0.423,
anchor=center,
axis x line=middle,
axis y line=none,
enlargelimits=0.1,
width=2cm,
height=15mm,
xtick=\empty,
ytick=\empty,
domain=0:85,
samples=15,
tickwidth=0,
clip mode=individual,
every axis plot/.append style={
smooth,
mark options={
draw=black,
fill=black,
mark size=1pt
}
},
before end axis/.code={
\node [draw,thick, shape=circle, inner sep=-2pt, fit=(current axis), label={below:{NCO}}] (nco) {};
}
}
}
\newcommand{\mixer}[2]
{ % #1 = reference coordinate, #2 = name
\node[draw, thick, shape=circle, minimum size=24pt, at={#1}](#2){};
\draw[rotate=45,line width=0.5pt] (#2.center)+(0,-12pt) -- +(0,12pt);
\draw[rotate=-45,line width=0.5pt] (#2.center)+(0,-12pt) -- +(0,12pt);
}
\newcommand{\BPF}[3]
{ % #1 - reference coordinate, #2 - name, #3 - subscript label
\node[
draw,
shape=rectangle,
thick,
minimum size=24pt,
at={#1},
label={below:{#3}}
](#2){};
%%% middle tilde
\draw (#2.center)+(-8pt,0) % first coordinate for the line segment
to[bend left] (#2.center) % draw a curved line that bends to the left. The curve starts at the first coordinate and ends at the next coordinate.
to[bend right] +(8pt,0); % This means to draw a curved line that bends to the right. The curve starts at the previous coordinate and ends at the next coordinate.
%%% upper tilde
\draw ([yshift=5pt]#2.center)+(-8pt,0) % starting point of the path. The yshift key is used to shift the starting point vertically by 5pt.
to[bend left] ([yshift=5pt]#2.center) % second point of the path. It is located at the center of the bpf node, shifted 5pt vertically.
to[bend right] +(8pt,0); % third point of the path. It is located 8pt to the right, relative to the second point. The + sign indicates that the point is relative to the second control point.
\draw[rotate=20] ([yshift=5pt]#2.center)+(-4pt,0) -- +(7pt,0); % strike out the upper tilde
%%% lower tilde
\draw ([yshift=-5pt]#2)+(-8pt,0)
to[bend left] ([yshift=-5pt]#2.center)
to[bend right] +(8pt,0);
\draw[rotate=20] ([yshift=-5pt]#2.center) +(-7pt,0) -- +(4pt,0);
}
\newcommand{\ADC}[2]{
\begin{scope}[transform shape,rotate=#2]
%%% sampler
\node[draw, shape=rectangle, thick, minimum width=28pt, minimum height=28pt, at={(#1)}](sampler){};
\draw (sampler.center)+(-9pt,-8pt)
to +(1pt,-8pt)
to +(8pt,5pt);
\draw[->] (sampler.center)+(-8pt,3pt)
node[shift={(7pt,5pt)}]() {\(T_{s,IF}\)}
to[bend left] +(8pt,-8pt);
%%% quantizer
\node[draw, shape=rectangle, thick, minimum size=28pt, at={([xshift=50pt]sampler)}](quantizer){}; % rectangle
\draw[->, line width=0.1pt, dashed, dash pattern= on 6pt off 2pt] ($(quantizer.south)+(0pt,+2pt)$) -- ($(quantizer.north)+(0pt,-2pt)$); % axis
\draw[->, line width=0.1pt, dashed, dash pattern= on 6pt off 2pt] ($(quantizer.west)+(3pt,0pt)$) -- ($(quantizer.east)+(-2pt,0pt)$);
\coordinate (begin) at ($(quantizer.center)+(-6pt,-9pt)$); % steps
\foreach \i in {0,...,5} {
\ifnum \i=0
\draw (begin)+(-5pt,0pt) -- (begin) -- +(2pt,0pt) -- +(2pt,3pt);
\else
\ifnum \i=5
\draw ($(begin)+\i*(2pt,3pt)$) -- +(2pt,0pt) -- +(2pt,3pt) -- +(8pt,3pt);
\else
\draw ($(begin)+\i*(2pt,3pt)$) -- +(2pt,0pt) -- +(2pt,3pt);
\fi
\fi
}
%%% ADC (outside block)
\node[draw, fit=(sampler) (quantizer), thick, rounded corners=5pt, inner ysep=20pt, inner xsep=5pt, yshift=5pt, dashed](adc-fit){};
\node[below, inner sep=5pt] at (adc-fit.north) {ADC};
\end{scope}
}
\tikzset{ar/.style={-latex,shorten >=-1pt, shorten <=-1pt}}
\begin{document}
\begin{circuitikz}
%%% antenna
\node[shape=antenna, xscale=-1, at={(-0.5,3)}](antenna){};
%%% LNA
\draw ([xshift=20pt]antenna.south) % starts a new drawing command at coordinate (0,3)
node[shape=buffer,scale=0.8](lna){} % adds a node at the current coordinate with the shape buffer and a scaling factor of 0.8. The lna label is assigned to this node, which can be used later to reference it.
node[below=0.6cm]{LNA}; % adds a label "LNA" above the buffer node, positioned 0.8 cm above the node's center.
%%% RF BPF
\BPF{([xshift=20pt]lna.out)}{rf-bpf}{\(B_{RF}\)}
%%% mixer1
\mixer{([xshift=25pt]rf-bpf.east)}{mixer1}
%%% IF BPF
\BPF{([xshift=25pt]mixer1.east)}{if-bpf}{\(B_{IF}\)}
%%% LO
\path (mixer1.center)
to[midway, sV, name=lo]
node[at={(lo.south)}](){LO}
([yshift=-100pt]mixer1.south);
%%% AGC
\draw (if-bpf.east)+(0.8,0) % starts a new drawing command at coordinate (0,3)
node[shape=buffer,scale=0.8](agc){} % adds a node at the current coordinate with the shape buffer and a scaling factor of 0.8. The lna label is assigned to this node, which can be used later to reference it.
node[below=0.6cm]{AGC}; % adds a label "LNA" above the buffer node, positioned 0.8 cm above the node's center.
%%% ADC
\path (agc.out)+(2,0)
to[sV,color=white,name=adc]
(agc.out)+(3,0);
\ADC{adc.center}{0}
%%% mixer2
\mixer{([xshift=110pt]adc.east)}{mixer2}
%%% NCO
\begin{axis}[ % no position defined, so this ends up at (0,0)
within block=ax1,
at={($(mixer2.center)+(-12pt,-48pt)$)},
anchor=north west]
\addplot+[
ycomb,
black,
mark options={
draw=black,
fill=black,
mark size=1pt
},
] {sin(2*pi*x)};
\end{axis}
%%% digital LPF
\node[draw, thick, shape=rectangle, minimum size=12pt, at={([xshift=40pt]mixer2.center)}, align=center](digital-lpf){Digital\\LPF};
%%% down-converter (outside block)
\node[draw, fit=(nco) (digital-lpf), thick, rounded corners=5pt, inner ysep=20pt, inner xsep=5pt, yshift=5pt, dashed](down-converter){};
\node[below, inner sep=5pt] at (down-converter.north) {Down-converter};
%%% decimator
\node[draw, thick, shape=rectangle, minimum size=12pt, at={([xshift=50pt]digital-lpf.center)}, align=center](decimator){$D \downarrow$};
%%% tracking and acquisition module
\node[draw, thick, shape=rectangle, minimum size=12pt, at={([xshift=60pt]decimator.east)}, align=center](tracking-acquisition-module){Tracking \&\\acquisition\\module};
% \node[draw, thick, shape=rectangle, inner sep=0pt, fit=(tracking-acquisition-module), shift={(5pt,5pt)}](second-channel){};
% \begin{scope}[local bounding box=second-channel]
% \clip (tracking-acquisition-module.north west) -- ++(0,4) (tracking-acquisition-module.north east);
% \node[draw, thick, shape=rectangle, inner sep=0pt, fit=(tracking-acquisition-module), shift={(10pt, 10pt)}]{};
% \end{scope}
\begin{scope}
\foreach \outmostchannel/\nextchannel in {tracking-acquisition-module/second-channel, second-channel/third-channel}{
\clip % change \clip by \draw to see the clip area
let
\p1 = (\outmostchannel.north west), % (\p1) == (\x1, \y1)
\p2 = (\outmostchannel.south east),
\p3 = (\outmostchannel.north east),
in
(\x1, \y1) -- ++(0,4) -- ++(+4,0) -- ($(\p2) + (2,0)$) -- (\p2) -- (\p3) -- cycle;% -- (\outmostchannel.north east);
\node[draw, thick, shape=rectangle, inner sep=0pt, fit=(\outmostchannel), shift={(5pt, 5pt)}](\nextchannel){};
}
\end{scope}
%%% wiring
\draw[] (antenna.south) -- (lna.in);
\draw[ar] (lna.out)--(rf-bpf);
\draw[ar] (rf-bpf)--(mixer1);
\draw[ar] (lo.west)--(mixer1); % `lo' is rotated, `lo.west' actually means its top
\draw[ar] (lo.west)-- +(0pt,15pt) |- +(-55pt,15pt) |- +(-55pt,35pt) -- +(-20pt,58pt);
\draw[ar] (mixer1) -- (if-bpf);
\draw[] (if-bpf) -- (agc.in);
\draw[ar] (agc.out) -- (sampler.west);
\draw[ar] (sampler.east) -- (quantizer.west);
\draw[ar] (quantizer.east) -- (mixer2.west);
\draw[ar] (nco.north) -- (mixer2.south);
\draw[ar] (mixer2.east) -- (digital-lpf.west);
\draw[ar] (digital-lpf.east) -- (decimator.west);
\draw[ar] (digital-lpf.east) -- +(10pt,0pt) |- +(0pt,-100pt) -- +(-220pt,-100pt) -- +(-220pt,-10pt) -- ([yshift=-5pt, xshift=6pt]agc.north);
\draw[ar] (decimator.east) --
node[pos=0.5, above]() {\(r\left[ n \right]\)}
(tracking-acquisition-module.west);
\end{circuitikz}
\end{document}
\documentclass[beamer,crop]{standalone} % for Beamer
\usepackage{times}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc}
\usetikzlibrary{patterns,angles,quotes}
\begin{document}
\begin{tikzpicture}
\def\thetaangle{180}
\def\phiangle{35}
\def\radiusearth{3}
\shade[ball color=blue, opacity=0.4, label={earth}, scale=\radiusearth] (0,0,0) circle[radius=1cm]; % earth
\draw[red, dashed] (0,0,0) ellipse [x radius=\radiusearth cm, y radius=0.2cm]; % radius
\coordinate (earth-surface) at ($(\radiusearth*sin{\phiangle}*cos{\thetaangle} ,\radiusearth*cos{\phiangle}, \radiusearth*sin{\phiangle}*sin{\thetaangle})$);
\coordinate (earth-origin) at (0,0,0);
\begin{scope}[transform shape, shift={(-300pt,0pt)}, scale=0.6, rotate=70]
\node[xscale=-1] (satellite) at (0, 0, 0) {\includegraphics[width={5cm}]{../receive_scenario/time_fit_IIF-1.png}}
coordinate (satellite-tip) at (0.9,-1.5, 0);
\end{scope}
\draw (satellite-tip)
-- (earth-surface) node[pos=0.5, above] {\(r\)}
-- (0,0,0) node[pos=0.5, right] {\(R\)}
-- cycle node[pos=0.5, below] {\(h\)};
\def\thetaangle{60}
\def\phiangle{-30}
\def\radiusline{2}
\draw [shift=(earth-surface)]($(\radiusline*sin{\thetaangle}*cos{\phiangle} ,\radiusline*cos{\thetaangle}, \radiusline*sin{\thetaangle}*sin{\phiangle})$)
-- (earth-surface)
-- ++($(-\radiusline*sin{\thetaangle}*cos{\phiangle} ,-\radiusline*cos{\thetaangle}, -\radiusline*sin{\thetaangle}*sin{\phiangle})$)
node (line-final) {};
\pic [draw, ->, "\(\alpha\)", angle eccentricity=1.2pt, angle radius=50pt] {angle = earth-origin--satellite-tip--earth-surface};
\pic [draw, ->, "\(\vartheta\)", angle eccentricity=1.5pt, angle radius=25pt] {angle = satellite-tip--earth-surface--line-final};
\pic [draw, ->, "\(\varphi\)", angle eccentricity=1.5pt, angle radius=15pt] {angle = earth-surface--earth-origin--satellite-tip};
\end{tikzpicture}
\end{document}
\documentclass[tikz]{standalone}
% features
% - for loop
% - \pgfdeclareshape
% - \path and intersection
% - \coordinate
% - \brace
\usetikzlibrary{positioning} % easier and more flexible way to position nodes relative to each other. With this library, you can use syntax such as right=of some-node or above left=of another-node to position a node relative to another node.
\usetikzlibrary{shapes} % ellipse
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{intersections}
\makeatletter
\pgfdeclareshape{vshape}{
% This error occurs because the center anchor is defined by default for all shapes in TikZ, and it is used internally by TikZ to position nodes relative to each other. Therefore, when you remove the center anchor from your custom shape, TikZ no longer knows how to position nodes relative to it. To avoid this error, you should always define the center anchor in your custom shapes, even if you don't plan to use it explicitly.
\savedanchor\centerpoint{ % center
\pgf@x=0pt
\pgf@y=5pt
}
\anchor{center}{
\centerpoint
}
\savedanchor\southpoint{ % south
\pgf@x=0pt
\pgf@y=0pt
}
\anchor{south}{
\southpoint
}
\savedanchor\westpoint{ % west
\pgf@x=-5pt
\pgf@y=0pt
}
\anchor{west}{
\westpoint
}
\savedanchor\eastpoint{ % east
\pgf@x=5pt
\pgf@y=0pt
}
\anchor{east}{
\eastpoint
}
\savedanchor\northpoint{ % north
\pgf@x=0pt
\pgf@y=10pt
}
\anchor{north}{
\northpoint
}
\backgroundpath{
\pgfpathmoveto{\westpoint}
\pgfpathlineto{\northpoint}
\pgfpathlineto{\eastpoint}
% \pgfpathclose
\pgfusepath{stroke} % draw the path that has been constructed using the \pgfpath...
}
}
\makeatother
\newcommand{\plasma}[3]{
\begin{scope}[shift={(#1)}, transform shape, scale=#2, rotate=#3]
% Define the control points for the Bezier curves
\def\cpa{(0,0)}
\def\cpb{(1,-1)}
\def\cpc{(2,-0.5)}
\def\cpd{(2.5,0.5)}
\def\cpe{(2.5,1.5)}
\def\cpf{(1.5,2)}
\def\cpg{(0.5,1)}
\def\cph{(0,1)}
% Draw the Bezier curves
\draw[thick] plot [smooth cycle, tension=1] coordinates {\cpa \cpb \cpc \cpd \cpe \cpf \cpg \cph};
% Add some shading to give the rock a 3-D effect
\shade[top color=blue!50, bottom color=gray!50] plot [smooth cycle, tension=1] coordinates {\cpa \cpb \cpc \cpd \cpe \cpf \cpg \cph};
\end{scope}
}
\newcommand{\satellite}[4]{% #1 = x-coordinate, #2 = y-coordinate, #3 = scale, #4 = rotate
\begin{scope}[shift={(#1,#2)}, transform shape, scale=#3, rotate=#4] % transform shape option ensures that the transformations are applied to the nodes within the scope, rather than just to the scope itself.
% central part
\node[draw, black, name=central-part] at (0,0) [minimum size=1cm] {};
% right little square
\node[draw, shape=rectangle, name=right-little-square, minimum size=0.3cm, right=0cm of central-part, anchor=west] {};
% right photovoltaic
\node[draw, shape=rectangle, name=right-photovoltaic, minimum height=1cm, minimum width=2cm, right=0cm of right-little-square, anchor=west] {};
% right left square
\node[draw, shape=rectangle, name=left-little-square, minimum size=0.3cm, left=0cm of central-part, anchor=east] {};
% left photovoltaic
\node[draw, shape=rectangle, name=left-photovoltaic, minimum height=1cm, minimum width=2cm, left=0cm of left-little-square, anchor=east] {};
% antenna
\node[draw, name=antenna-base, shape=ellipse, minimum width=2cm, minimum height=.5cm, below=0cm of central-part] {};
\node[draw, name=antenna-sat, shape=isosceles triangle, isosceles triangle apex angle=60, shape border rotate=90, minimum height=0.5cm, inner sep=0pt, below=0cm of antenna-base.center, anchor=south, rotate=180] {};
\end{scope}
}
\begin{document}
\begin{tikzpicture}
%% Earth
%% draw an arc and save the coordinate of its top
\shade[top color=brown!70, very thick,fill=yellow!20] (0,0) arc (70:110:20cm) coordinate[pos=0.5] (top); % (<init-degree>:<final-degree>:<radius>)
%% uncomment the line below to see the coordinate that it was saved
% \draw[red, ultra thick, shift=(top)] (-.1,-.1) -- (.1,.1) (-.1,.1) -- (.1,-.1);
%% ionosphere
\shade[top color=red!70, bottom color=yellow!50] (0,10) arc (70:110:20cm)
coordinate[pos=0] (ionosphere-northeast)
coordinate[pos=1] (ionosphere-northwest)
coordinate[pos=0.2,shift={(0,-1.5)}] (ionosphere-plasma1)
coordinate[pos=0.345,shift={(0,-1)}] (ionosphere-plasma2)
coordinate[pos=0.5,shift={(0,-1.3)}] (ionosphere-plasma3)
coordinate[pos=0.65,shift={(0,-1.6)}] (ionosphere-plasma4)
coordinate[pos=0.8,shift={(0,-1.9)}] (ionosphere-plasma5)
coordinate[pos=0.95,shift={(0,-0.8)}] (ionosphere-plasma6)
-- ++(0,-4) arc (110:70:20cm) -- cycle; % -- cycle is used to connect the end of the last path segment with the beginning of the first path segment. second arc is specified using ++ notation, which means that the endpoint of the arc is calculated relative to the current position. using + notation, which means that the endpoint of the arc is calculated relative to the start of the arc.
%% satellite
\satellite{-3}{15}{0.55}{-23}
% \draw[red, ultra thick, shift=(sat.north)] (-.1,-.1) -- (.1,.1) (-.1,.1) -- (.1,-.1);
%% receiver
\node[shape=vshape,fill=blue,minimum width=1cm,minimum height=1cm, below=0cm of top, anchor=south, scale=4] (my-base) {};
%% to see the anchor positions, uncomment the lines below
% \foreach \anchor/\shift in {center/below, south/below, north/above, east/right, west/left}
% \draw [draw=red, shift=(v.\anchor)] node [\shift] {\anchor}
% (-.1,-.1) -- (.1,.1) (-.1,.1) -- (.1,-.1);
\pgfmathsetmacro{\angle}{-20} % angle rotation
\draw[rotate=\angle, shift=(my-base.north)] (-0.75,0.75) arc (-180:0:0.75cm) -- cycle;
\coordinate (begin) at (my-base.north)+(-0.75,0.75);
\coordinate (center) at ($(begin) + ({\angle+90}:0.75cm)$); % center point of the half-circle
\node[draw, shape=isosceles triangle, isosceles triangle apex angle=60, shape border rotate=90, minimum height=0.3cm, inner sep=0pt, below=0cm of center, anchor=south, rotate=\angle] (antenna-receiver) {};
%% Define the amplitude function
\pgfmathdeclarefunction{amplitudefunc}{1}{%
\pgfmathparse{sin(#1*180)/2 + 1}%
}
%% Find the intersection point between the radio signal and the upper layer of the ionosphere
\path[name path=upper-arc] (0,10) arc (70:110:20cm); % upper arc of the ionophere layer
\path[name path=line] (antenna-receiver.north) -- (antenna-sat.north); % radio signal path
\path[name intersections={of=upper-arc and line, by=upper-intersection}];
%% radio signal
\draw[decorate, decoration={snake, amplitude=1mm, segment length=5mm}] (upper-intersection) -- (antenna-sat.north); % sat-upper layer of the ionosphere
\coordinate (initcoordinate) at (upper-intersection); % assign initcoordinate to intersect
\foreach \i/\amplitude in {0.2/0.9, 0.2/1.6, 0.25/0.8, 0.5/1.4, 0.2/0.3}{ % the "/" works like zip() function in Python
\coordinate (finalcoordinate) at ($(initcoordinate)!\i!(antenna-receiver.north)$); % applying the draw by parts
\draw[decorate, decoration={snake, amplitude={\amplitude mm}, segment length=2mm}] (initcoordinate) -- (finalcoordinate);
\coordinate (initcoordinate) at (finalcoordinate); % assign initcoordinate to finalcoordinate
}
\draw[decorate, decoration={snake, amplitude={0.8mm}, segment length=2mm}] (initcoordinate) -- (antenna-receiver.north); % final path
%% plasmas
\plasma{ionosphere-plasma1}{0.35}{20}
\plasma{ionosphere-plasma2}{0.25}{70}
\plasma{ionosphere-plasma3}{0.15}{30}
\plasma{ionosphere-plasma4}{0.2}{30}
\plasma{ionosphere-plasma5}{0.4}{30}
\plasma{ionosphere-plasma6}{0.23}{30}
%% regions
\draw[decorate, decoration={brace, amplitude=10pt}] ({ionosphere-northeast}) -- +(0,-1.5)
coordinate (init-base)
node[midway, right=12pt] {F-region};
\draw[decorate, decoration={brace, amplitude=10pt}] ({init-base}) -- +(0,-1.2)
coordinate (init-base)
node[midway, right=12pt] {E-region};
\draw[decorate, decoration={brace, amplitude=10pt}] ({init-base}) -- +(0,-1.2)
coordinate (init-base)
node[midway, right=12pt] {D-region};
%% LOS components
\draw[decorate, decoration={brace, amplitude=20pt, raise=20pt, aspect=0.35pt}] (antenna-receiver.north) -- node[xshift=-100pt, yshift=-33pt, align=center] {LOS components\\\(\tau(t),\phi_0(t),\nu(t)\)} (antenna-sat.north);
%% Find the intersection point between the radio signal and the lower layer of the ionosphere
\path[name path=lower-arc] (0,10)++(0,-4) arc (70:110:20cm); % lower arc of the ionosphere layer
\path[name intersections={of=lower-arc and line, by=lower-intersection}];
%% ionosphere components
\draw[decorate, decoration={brace, amplitude=20pt, raise=2pt, aspect=0.65pt}] (upper-intersection) -- node[xshift=50pt, yshift=-33pt, align=center] {Scintillation\\components\\\(\phi_s(t),\gamma_s(t)\)} (lower-intersection);
%% ionosphere inhomogeneities
\draw[->] (-9.5,11.5) -- (-8.95,10.1) node[pos=0, above, align=center] {ionophere\\inhomogeneities};
\end{tikzpicture}
\end{document}
\documentclass[tikz, border=5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.17, % Specify the compatibility version
nice_axis/.style={
samples=101,
domain=-2:2,
% title={Triangle Function}, % title={Triangle Function},
xmax=3,
xmin=-3,
ymax=1.2,
ymin=-0.2,
ytick={-1, 0, 1},
% ytick distance=0.2, % another setting
xtick={-3,-2,...,3},
grid=none,
axis lines=center, % right, left, none, box
axis line style={->},
xlabel={$\Re{x\left( t \right)}$},
ylabel={$\Im{x\left( t \right)}$},
x label style={at={(axis description cs:1,0.5)},anchor=west},
y label style={at={(axis description cs:0.5,1)},rotate=0,anchor=south},
yticklabels={},
xticklabels={,\(-\varepsilon\),{},{},{},\(\varepsilon\)},
% xlabel style={at={(ticklabel* cs:1.02)}, anchor=west} % cs stands for coordinate system. The * in ticklabel* means it refers to the transformed coordinate system, taking into account any log scales or other transformations that might be applied to the axis. So, in simpler terms, cs:1.02 means "1.02 times the length of the tick label." This allows you to position elements slightly beyond the axis limits or labels.
legend pos=outer north east,
}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
nice_axis,
]
\addplot[black, thick, mark=none, smooth] {1-0.5*abs(x)} node[below, pos=0.9] {};
%%% k
\addplot[gray, mark=*, opacity=0.85] (0.3, {1-0.5*abs(0.3)}) coordinate (k-late)
node[above right, black] () {late};
\addplot[gray, mark=*, opacity=0.85] (-0.3, {1-0.5*abs(-0.3)}) coordinate (k-early)
node[above left, black] () {early};
\draw [decorate, decoration={brace, amplitude=10pt, mirror, aspect=0.7}, black]
(k-early) -- (k-late)
node[midway, below=16pt, right=-1.5pt, black] {\(k\)};
%%% k-1
\addplot[gray, mark=*, opacity=0.85] (-0.6, {1-0.5*abs(-0.6)}) coordinate (k-1-late)
node[above left, black] () {late};
\addplot[gray, mark=*, opacity=0.85] (-1.2, {1-0.5*abs(-1.2)}) coordinate (k-1-early)
node[above left, black] () {early};
\draw [decorate, decoration={brace, amplitude=10pt}, black]
(k-1-early) -- (k-1-late)
node[above=10pt, left=6pt, midway, black] {\(k-1\)};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[beamer,crop]{standalone}
\usepackage{times}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.17, % Specify the compatibility version
nice_axis/.style={
xlabel={$x$},
ylabel={$y$},
% title={Triangle Function},
grid=both,
axis lines=box,
samples=101,
domain=-2:2,
xmax=1,
xmin=-1,
ymax=1.2,
ymin=-0,
ytick={0, 0.2, ..., 1},
legend pos=outer north east,
}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
nice_axis,
]
\addplot[black, thick, mark=none] coordinates {
(-1,0)
(-0.5,0)
(-0.5,1)
(0.5,1)
(0.5,0)
(1,0)
};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[beamer,crop]{standalone}
\usepackage{times}
\usepackage{siunitx}
\usepackage{physics}
\AtBeginDocument{\RenewCommandCopy\qty\SI}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.17, % Specify the compatibility version
nice_axis/.style={
xlabel={$f\cdot T_c$},
ylabel={$10 \cdot\log_{10}\left( \abs{P_\sqcap \left( f\cdot T_c \right)}^{2} \right)$},
% title={Triangle Function},
grid=both,
axis lines=box,
samples=201,
domain=-4*pi:4*pi,
xmin=-4*pi,
xmax=4*pi,
% ymax=1,
% ymin=-0.3,
% ytick={0, 0.2, ..., 1},
legend pos=north east,
}
}
\begin{document}
\begin{tikzpicture}
\pgfmathdeclarefunction{sinc}{1}{%
\pgfmathparse{(#1==0 ? 1: sin(pi*#1 r))/(#1==0 ? 1: pi*#1)}%
}
\begin{axis}[
nice_axis,
declare function={
P_sqr(\x,\Tc)= sqrt(\Tc) * sinc(\x);
},
]
\addplot[variable=\fTc, black, thick, mark=none] {10*log10(abs(P_sqr(\fTc,10))^2)};
\addlegendentry{\(T_c = \qty{10}{\second}\)};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[beamer,crop]{standalone}
\usepackage{times}
\usepackage{pgfplots,xparse}
\pgfplotsset{
compat=1.17, % Specify the compatibility version
nice_axis/.style={
xlabel={$t/T_c$},
ylabel={$p_{BOC_{\cos} \left( 1,1 \right)}\left( t \right)\cdot \sqrt{T_c}$},
grid=both,
axis lines=box,
samples=101,
domain=-2:2,
xmin=-1,
xmax=1,
ymax=1.2,
ymin=-1.2,
ytick distance=0.2,
legend pos=outer north east,
}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
nice_axis,
]
\addplot[dotted, red, dash pattern=on 4pt off 2pt on 1pt off 2pt, line width=1pt] coordinates {
(-1,0)
(-0.5,0)
(-0.5,1)
(-0.25,1)
(-0.25,-1)
(0.25,-1)
(0.25,1)
(0.5,1)
(0.5,0)
(1,0)
};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[beamer,crop]{standalone}
\usepackage{times}
\usepackage{physics}
\usepackage{pgfplots}
\usetikzlibrary{calc}
\pgfplotsset{
compat=1.17, % Specify the compatibility version
nice_axis/.style={
samples=101,
domain=-2:2,
% title={Triangle Function},
xmax=1.2,
xmin=-1.2,
ymax=1.2,
ymin=-1.2,
ytick={0},
xtick={0},
% grid=both,
axis lines=middle,
axis line style={->},
xlabel={$\Im{\tilde{x}\left( t \right)}$},
ylabel={$\Re{\tilde{x}\left( t \right)}$},
x label style={at={(axis description cs:1,0.5)},anchor=west},
y label style={at={(axis description cs:0.5,1)},rotate=0,anchor=south},
legend pos=outer north east
}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
nice_axis,
]
\addplot[only marks, black, thick, mark=*, data cs=polar] coordinates {
(0, 0)
(0, 1)
(45, 0.713)
(90, 1)
(135, 0.713)
(180, 1)
(-135, 0.713)
(-90, 1)
(-45, 0.713)
};
\draw[gray, thick, dashed] (-45:0.713)
-- (45: 0.713)
-- (135:0.713)
-- (-135:0.713)
-- (-45:0.713);
\draw[gray, thick, dashed] (0 :1)
-- (90:1)
-- (180:1)
-- (-90:1)
-- cycle;
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[beamer,crop]{standalone}
\usepackage{times}
\usepackage{physics}
\usepackage{pgfplots}
\usetikzlibrary{calc}
\tikzset{ar/.style={-latex,shorten >=-1pt, shorten <=-1pt}}
\pgfplotsset{
compat=1.17, % Specify the compatibility version
nice_axis/.style={
samples=101,
domain=-2:2,
% title={Triangle Function},
xmax=1.2,
xmin=-1.2,
ymax=1.2,
ymin=-1.2,
ytick={0},
xtick={0},
% grid=both,
axis lines=middle,
axis line style={->},
xlabel={$\Im{s\left( t \right)}$},
ylabel={$\Re{s\left( t \right)}$},
x label style={at={(axis description cs:1,0.5)},anchor=west},
y label style={at={(axis description cs:0.5,1)},rotate=0,anchor=south},
legend pos=outer north east
}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
nice_axis,
]
\addplot[black, thick, domain=0:360, samples=100, smooth] ({cos(x)}, {sin(x)});
\addplot[red, thick, mark=*, data cs=polar] coordinates {
(30,1)
} coordinate (angle30);
\addplot[blue, thick, mark=*, data cs=polar, yshift=12.5pt] coordinates{
(30,1)
} coordinate (angle30_shifted);
\addplot[red, thick, mark=*, data cs=polar] coordinates {
(60,1)
} coordinate (angle60);
\addplot[blue, thick, mark=*, data cs=polar, yshift=-12.5pt] coordinates {
(60,1)
} coordinate (angle60_shifted);
\addplot[red, thick, mark=*, data cs=polar] coordinates {
(120, 1)
} coordinate (angle120);
\addplot[blue, thick, mark=*, data cs=polar, yshift=-12.5pt] coordinates {
(120, 1)
} coordinate (angle120_shifted);
\addplot[red, thick, mark=*, data cs=polar] coordinates {
(150, 1)
} coordinate (angle150);
\addplot[blue, thick, mark=*, data cs=polar, yshift=12.5pt] coordinates {
(150, 1)
} coordinate (angle150_shifted);
\addplot[red, thick, mark=*, data cs=polar] coordinates {
(-150, 1)
} coordinate (angle-150);
\addplot[blue, thick, mark=*, data cs=polar, yshift=-12.5pt] coordinates {
(-150, 1)
} coordinate (angle-150_shifted);
\addplot[red, thick, mark=*, data cs=polar] coordinates {
(-120, 1)
} coordinate (angle-120);
\addplot[blue, thick, mark=*, data cs=polar, yshift=12.5pt] coordinates {
(-120, 1)
} coordinate (angle-120_shifted);
\addplot[red, thick, mark=*, data cs=polar] coordinates {
(-60, 1)
} coordinate (angle-60);
\addplot[blue, thick, mark=*, data cs=polar, yshift=12.5pt] coordinates {
(-60, 1)
} coordinate (angle-60_shifted);
\addplot[red, thick, mark=*, data cs=polar] coordinates {
(-30, 1)
} coordinate (angle-30);
\addplot[blue, thick, mark=*, data cs=polar, yshift=-12.5pt] coordinates {
(-30, 1)
} coordinate (angle-30_shifted);
\draw[dashed] (angle30_shifted) -- (angle-30_shifted)
coordinate[pos=0.4] (right_ref);
\draw[ar, thick] ([xshift=6pt]angle30_shifted) -- ([xshift=6pt]angle30);
\draw[ar, thick] ([xshift=6pt]angle-30_shifted) -- ([xshift=6pt]angle-30);
\draw[dashed] (angle60) -- (angle-60)
coordinate[pos=0.6] (inner_right_ref);
\draw[ar, thick] ([xshift=-6pt]angle60_shifted) -- ([xshift=-6pt]angle60);
\draw[ar, thick] ([xshift=-6pt]angle-60_shifted) -- ([xshift=-6pt]angle-60);
\draw[dashed] (angle120) -- (angle-120);
\draw[ar, thick] ([xshift=6pt]angle120_shifted) -- ([xshift=6pt]angle120);
\draw[ar, thick] ([xshift=6pt]angle-120_shifted) -- ([xshift=6pt]angle-120);
\draw[dashed] (angle150_shifted) -- (angle-150_shifted);
\draw[ar, thick] ([xshift=-6pt]angle150_shifted) -- ([xshift=-6pt]angle150)
coordinate[pos=0.4] (im1);
\draw[ar, thick] ([xshift=-6pt]angle-150_shifted) -- ([xshift=-6pt]angle-150)
coordinate[pos=0.4] (im2);
\draw[dashed] (angle150_shifted) -- (angle30_shifted)
coordinate[pos=0.85] (top_ref);
\draw[dashed] (angle-150_shifted) -- (angle-30_shifted);
\end{axis}
\draw[ar, thick] ([shift={(20pt,20pt)}]top_ref)
node[right] {\(\sqrt{P_1}\)}
-- (top_ref);
\draw[ar, thick] ([shift={(20pt,10pt)}]right_ref)
node[right] {\(\sqrt{P_2} + \sqrt{P_3}\)}
-- (right_ref);
\draw[ar, thick] ([shift={(50pt,-10pt)}]inner_right_ref)
node[right] {\(\sqrt{P_2} - \sqrt{P_3}\)}
-- (inner_right_ref);
\draw[ar, thick] ([shift={(-40pt,-10pt)}]im1)
node[left] (im_text) {im}
-- ([xshift=-3pt]im1);
\draw[ar, thick] (im_text) -- ([xshift=-3pt]im2);
\end{tikzpicture}
\end{document}
\documentclass[beamer,crop]{standalone}
\usepackage{times}
\usepackage{physics}
\usepackage{pgfplots}
\usetikzlibrary{calc}
\pgfplotsset{
compat=1.17, % Specify the compatibility version
nice_axis/.style={
samples=101,
domain=-2:2,
% title={Triangle Function},
xmax=1.2,
xmin=-1.2,
ymax=1.2,
ymin=-1.2,
ytick={0},
xtick={0},
% grid=both,
axis lines=middle,
axis line style={->},
xlabel={$\Im{s\left( t \right)}$},
ylabel={$\Re{s\left( t \right)}$},
x label style={at={(axis description cs:1,0.5)},anchor=west},
y label style={at={(axis description cs:0.5,1)},rotate=0,anchor=south},
legend pos=outer north east
}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
nice_axis,
]
\addplot[black, thick, domain=0:360, samples=100, smooth] ({cos(x)}, {sin(x)});
\addplot[only marks, black, thick, mark=*, data cs=polar] coordinates {
(0, 1)
(45, 1)
(90, 1)
(135, 1)
(180, 1)
(-135, 1)
(-90, 1)
(-45, 1)
};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{filecontents}
\usetikzlibrary{backgrounds, plotmarks}
\begin{filecontents*}{source.txt}
1,4,5,1
2,3,1,5
3,5,6,1
4,1,4,9
5,3,4,7
\end{filecontents*}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=Epochs,
ylabel=Learning curve,
grid=both, % Add both major and minor grid lines
grid style={dashed, gray, opacity=0.5}, % Style of grid lines
tick style={semithick}, % Tick style
]
\addplot[black, ultra thick, mark=none] table [
x index=0, % First column as x
y index=1, % Plot the 1st column as y
col sep=comma, % Use comma as the separator
] {source.txt};
\begin{scope}[on background layer]
\foreach \i in {1,...,2} {
% Plot data from source.txt without headers
\addplot+[
only marks, % Only plot markers, not lines
mark=*, % Fill markers
mark size=2, % Size of markers
color=red, % Color of marker edges (border)
mark options={scale=1, fill=red}
] table [
x index=0, % First column as x
y index=\i, % Plot the i-th column as y
col sep=comma, % Use comma as the separator
] {source.txt};
}
\end{scope}
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass{article}
\usepackage{pgfplots}
\usepackage{filecontents}
\begin{filecontents*}{data.csv}
1,4,5,1
2,3,1,5
3,5,6,1
4,1,4,9
5,3,4,7
\end{filecontents*}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=Index,
ylabel=Value,
]
% Plot data from data.csv without headers
\addplot table [
x index=0, % First column as x
y index=2, % Third column as y
col sep=comma, % Use comma as the separator
] {data.csv};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{tikz,pgfplots}
\pgfplotsset{
standard/.style={%Axis format configuration
width=5cm,
axis x line=middle,
axis y line=middle,
enlarge x limits=0.15,
enlarge y limits=0.15,
every axis x label/.style={at={(current axis.right of origin)},anchor=north west},
every axis plot post/.style={mark options={fill=white}},
xticklabel style={align=center},
xmin=-0.5, xmax=6,
ymin=0, ymax=2,
xlabel={$n$},
}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[standard]
\addplot+[ycomb,black,thick] plot coordinates {(0,1) (1,0.5) (2,1) (3,1)};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{tikz,pgfplots}
\pgfplotsset{
standard/.style={%Axis format configuration
axis lines=box,
% enlarge x limits=0.15,
% enlarge y limits=0.15,
every axis plot post/.style={mark=*},
xticklabel style={align=center},
xmin=-10, xmax=10,
ymin=0, ymax=1.2,
grid=both,
grid style={dashed, gray!50, opacity=0.6}, % Set grid to dashed and gray
xtick={-10,-8,...,10},
xlabel={$f/f_s$},
ylabel={$\Psi_L\left( f \right), \Psi^{'}_{L}\left( f \right)$},
},
/pgfplots/my legend style/.style={
/pgfplots/legend image code/.code={
\draw[##1] (0pt,-4pt) -- (0pt,2pt);
\fill[##1] (0pt,2pt) circle[radius=1pt, solid];
},
},
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
standard,
my legend style,
]
\addplot[ycomb,red] plot coordinates {(-1,1)};
\addlegendentry{\(\Psi_L\left( f \right)\)};
\addplot[ycomb,black] plot coordinates { (1,1)};
\addlegendentry{\(\Psi^{'}_{L}\left( f \right)\)};
\end{axis}
\end{tikzpicture}
\end{document}
%%% featues %%%
% violinplot
%%% picture %%%
% https://tex.stackexchange.com/a/679168/222785
\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikzviolinplots}
\usepgfplotslibrary{external}
\tikzexternalize
\usepackage{minted}
\usemintedstyle{gruvbox-light}
\usepackage{scontents}
\begin{scontents}[write-out=violinandboxplotexample.dat]
A B C D
0.876 0.574 2.175 1.684
1.015 0.822 2.121 2.290
0.995 1.266 1.916 2.184
1.101 0.740 2.044 2.065
1.222 0.636 2.004 2.248
0.712 1.753 2.038 2.200
1.063 0.873 1.974 1.865
0.973 1.020 2.145 1.895
1.174 0.763 2.052 2.240
1.057 1.293 2.079 2.360
1.004 0.853 2.064 1.695
0.909 0.694 2.136 1.837
1.108 0.849 2.000 1.744
1.210 0.468 2.010 1.820
0.958 0.767 1.824 2.158
1.119 0.940 2.034 1.846
1.000 0.962 1.967 2.545
0.954 1.551 1.833 1.816
0.918 0.755 1.914 2.369
1.093 0.973 1.997 1.543
\end{scontents}
\begin{document}
\begin{tikzpicture}
\violinsetoptions[
averages,
data points,
scaled,
]{
xmin=0,xmax=5,
ymin=0,ymax=3,
xlabel style={
yshift = {-2*height("a")}
},
ymajorgrids=true,
ylabel={Same property},
}
\violinplotwholefile[%
primary color=red,
secondary color=blue,
indexes={A,B,C,D},
spacing=1.0,
labels={%
$\alpha$,
$\beta$,
$\gamma$,
$\delta$,
},
col sep=tab,
dataset size=1pt,
dataset mark=*,
dataset fill=black!50!white,
dataset fill opacity=1.0,
average mark=x,
average size=5pt,
]{violinandboxplotexample.dat}
\end{tikzpicture}
\end{document}
1,4,5,1
2,3,1,5
3,5,6,1
4,1,4,9
5,3,4,7
test line
hello my world
test line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment