texlive[74311] branches/branch2024.final/Master/texmf-dist:

commits+karl at tug.org commits+karl at tug.org
Wed Feb 26 22:14:11 CET 2025


Revision: 74311
          https://tug.org/svn/texlive?view=revision&revision=74311
Author:   karl
Date:     2025-02-26 22:14:11 +0100 (Wed, 26 Feb 2025)
Log Message:
-----------
tikzviolinplots (branch) (26feb25)

Modified Paths:
--------------
    branches/branch2024.final/Master/texmf-dist/doc/latex/tikzviolinplots/tikzviolinplots.pdf
    branches/branch2024.final/Master/texmf-dist/doc/latex/tikzviolinplots/tikzviolinplots.tex
    branches/branch2024.final/Master/texmf-dist/tex/latex/tikzviolinplots/tikzviolinplots.sty

Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tikzviolinplots/tikzviolinplots.pdf
===================================================================
(Binary files differ)

Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tikzviolinplots/tikzviolinplots.tex
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/latex/tikzviolinplots/tikzviolinplots.tex	2025-02-26 21:14:01 UTC (rev 74310)
+++ branches/branch2024.final/Master/texmf-dist/doc/latex/tikzviolinplots/tikzviolinplots.tex	2025-02-26 21:14:11 UTC (rev 74311)
@@ -1,5 +1,5 @@
 %% tikzviolinplots.tex
-%% Copyright 2023 Pedro Callil-Soares
+%% Copyright 2025 Pedro Callil-Soares
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3
@@ -254,7 +254,7 @@
 The plots are mirrored by default; however, passing the option \texttt{no mirror}
 will show only half the plot, as shown in figure \ref{graph:violin_horiz}.
 
-Finally, to ``transpose'' the plots (\textit{i.e.} show the distributions
+Finally, to ``transpose'' the plots (\textit{i.e.}, show the distributions
 as functions of the abcissa, as in figure \ref{graph:violin_horiz},
 and not as functions of ordinate, as in figure \ref{graph:violin_verti}),
 one might use the option \texttt{reverse axis}.
@@ -264,7 +264,7 @@
 The minima and maxima of the plot axes must be set in the second (and first
 mandatory) argument to the command, and should follow \texttt{pgfplots}
 syntax. For instance, to set the minimum and maximum of the $x$-axis
-to -3 and 6, and of the $y$-axis to 2.5 and 7, one might use:
+to $-3$ and 6, and of the $y$-axis to $2.5$ and 7, one might use:
 
 \begin{minted}[escapeinside=||]{latex}
 	\violinsetoptions[|\textit{<package-specific options>}|]%
@@ -289,7 +289,7 @@
 \end{minted}
 
 The filename (mandatory argument) must be a path to a file storing the data as
-space-separated columns. The optional argument is a list of options, including:
+comma-separated columns. The optional argument is a list of options, including:
 
 \begin{itemize}
 	\item \texttt{col sep}: Column separation character in filename.
@@ -343,6 +343,8 @@
 		\item \texttt{average fill opacity}, \texttt{dataset fill opacity}:
 			Opacity of the marks. Defaults to 0.5 for averages and
 			0.2 for the other points.
+		\item \texttt{dataset jitter}:
+			Amount by which to randomly jitter the marks. May help with distinguishing overlapping points. Defaults to $0.0$ (\textit{i.e.}, no jitter).
 	\end{itemize}
 \end{itemize}
 
@@ -471,9 +473,9 @@
 	\violinplotwholefile[%
 		primary color=orange,
 		secondary color=black,
-		batch indexes={C,B,A,D,E},
-		batch spacing=1.0,
-		batch labels={%
+		indexes={C,B,A,D,E},
+		spacing=1.0,
+		labels={%
 			$\alpha$,
 			$\beta$,
 			$\gamma$,
@@ -661,6 +663,7 @@
 			color=green!33!black,
 			label={Estimated bandwidth},
 			col sep=tab,
+			dataset jitter=0.2,
 		]{example.dat}
 		\violinplot[%
 			index=A,
@@ -669,6 +672,7 @@
 			color=green!12!black,
 			label={Smaller bandwidth},
 			col sep=tab,
+			dataset jitter=0.6,
 		]{example.dat}
 		\begin{axis}[
 			xmin=0,xmax=6,
@@ -734,6 +738,7 @@
 		color=green!33!black,
 		label={Estimated bandwidth},
 		col sep=tab,
+		dataset jitter=0.2,
 	]{example.dat}
 	\violinplot[%
 		index=A,
@@ -742,6 +747,7 @@
 		color=green!12!black,
 		label={Smaller bandwidth},
 		col sep=tab,
+		dataset jitter=0.6,
 	]{example.dat}
 	\begin{axis}[
 		xmin=0,xmax=6,
@@ -861,7 +867,7 @@
 Using the key \texttt{invert=true} in the options of
 \texttt{\textbackslash violinplot} one can plot two different sets of data side
 by side, in an asymmetrical violin plot. This can be seen in figure
-\ref{graph:asymmetrical}, that exhibits the male and female life expectancy at
+\ref{graph:asymmetrical}, which exhibits the male and female life expectancy at
 birth, in 2019, for several countries, segregated in the WHO regions.\footnote{
 	\url{https://www.who.int/data/gho/publications/world-health-statistics}.
 }.
@@ -998,7 +1004,7 @@
 	\label{graph:asymmetrical}
 \end{figure}
 
-The code for figure \ref{graph:asymmetrical} is avaliable below:
+The code for figure \ref{graph:asymmetrical} is available below:
 
 \begin{minted}[%
 	escapeinside=||,
@@ -1177,4 +1183,8 @@
 For the same reason, the options \texttt{xmin}, \texttt{ymin}, \texttt{xmax}
 and \texttt{ymax} are required; no automatic placement is performed.
 
+\section{Acknowledgements}
+
+The author thanks Falko Galperin for the implementation of the jitter option.
+
 \end{document}

Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tikzviolinplots/tikzviolinplots.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tikzviolinplots/tikzviolinplots.sty	2025-02-26 21:14:01 UTC (rev 74310)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tikzviolinplots/tikzviolinplots.sty	2025-02-26 21:14:11 UTC (rev 74311)
@@ -1,5 +1,5 @@
 %% tikzviolinplots.sty
-%% Copyright 2023 Pedro Callil-Soares
+%% Copyright 2025 Pedro Callil-Soares
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,7 @@
 % tikzviolinplots.tex.
 
 \NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{tikzviolinplots}[2023/03/23 v0.7.2 Violin plot creation in pgfplots]
+\ProvidesPackage{tikzviolinplots}[2025/02/26 v0.8.0 Violin plot creation in pgfplots]
 
 \RequirePackage{pgfplots}
 \RequirePackage{pgfplotstable}
@@ -53,6 +53,7 @@
 		dataset opacity=1.0,
 		dataset fill=black,
 		dataset fill opacity=0.2,
+		dataset jitter=0.0
 	},
 	col sep/.estore in = \violin at colsep,
 	kernel/.estore in = \violin at kernel,
@@ -75,6 +76,7 @@
 	dataset opacity/.estore in = \violin at pts@opacity,
 	dataset fill/.estore in = \violin at pts@fillcolor,
 	dataset fill opacity/.estore in = \violin at pts@fillopacity,
+	dataset jitter/.estore in = \violin at pts@jitter,
 	/violinplotwholefile/.is family, /violinplotwholefile,
 	default/.style = {
 		col sep=comma,
@@ -97,6 +99,7 @@
 		dataset opacity=1.0,
 		dataset fill=black,
 		dataset fill opacity=0.2,
+		dataset jitter=0.0,
 		spacing=1.0,
 		indexes={A,B,C},
 		primary color=blue,
@@ -123,6 +126,7 @@
 	dataset opacity/.estore in = \violin at batch@pts at opacity,
 	dataset fill/.estore in = \violin at batch@pts at fillcolor,
 	dataset fill opacity/.estore in = \violin at batch@pts at fillopacity,
+	dataset jitter/.estore in = \violin at batch@pts at jitter,
 	spacing/.estore in = \violin at batch@delta,
 	indexes/.estore in = \violin at batch@indexes,
 	primary color/.estore in = \violin at batch@color at primary,
@@ -599,6 +603,7 @@
 				opacity=\violin at pts@opacity,
 				fill=\violin at pts@fillcolor,
 				fill opacity=\violin at pts@fillopacity,
+				\violin at axis@x\space filter/.expression={\violin at axis@x + \violin at pts@jitter * rand}
 			] table [
 				\violin at axis@x=deltacol,
 				\violin at axis@y=\violin at index,
@@ -676,6 +681,7 @@
 			dataset opacity = \violin at batch@pts at opacity,
 			dataset fill = \violin at batch@pts at fillcolor,
 			dataset fill opacity = \violin at batch@pts at fillopacity,
+			dataset jitter = \violin at batch@pts at jitter
 		]{\violin at batch@filename}
 
 		\pgfmathparse{int(\violin at batch@counter+1)}



More information about the tex-live-commits mailing list.