summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/statistics
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-09-29 21:14:48 +0000
committerKarl Berry <karl@freefriends.org>2019-09-29 21:14:48 +0000
commit93a11227b03ad98457bca1529daa7f5a435fab86 (patch)
treecaa48f43de1e0bfd1692df5799f1bb7da6012e16 /Master/texmf-dist/tex/latex/statistics
parent33a8690dfc5c6d1c918a294a7fa070048d85dbe1 (diff)
statistics (29sep19)
git-svn-id: svn://tug.org/texlive/trunk@52212 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/statistics')
-rw-r--r--Master/texmf-dist/tex/latex/statistics/statistics.sty59
1 files changed, 44 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/statistics/statistics.sty b/Master/texmf-dist/tex/latex/statistics/statistics.sty
index 758157ed6f2..c9c83834ce3 100644
--- a/Master/texmf-dist/tex/latex/statistics/statistics.sty
+++ b/Master/texmf-dist/tex/latex/statistics/statistics.sty
@@ -6,17 +6,17 @@
%%
%% statistics.dtx (with options: `package')
%%
-%% File: statistics.dtx (C) Copyright 2014-2018 RIVAUD Julien
+%% File: statistics.dtx (C) Copyright 2014-2019 RIVAUD Julien
%%
%% It may be distributed and/or modified under the conditions of the
%% General Public License (GPL), either version 3 of this
%% license or (at your option) any later version.
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\RequirePackage{expl3}[2016/01/19]
+\RequirePackage{expl3}[2018/06/19]
\def\ExplFileName{statistics}
\def\ExplFileDescription{Compute and typeset statistics table and graphics}
-\def\ExplFileDate{2018/07/21}
-\def\ExplFileVersion{2.0}
+\def\ExplFileDate{2019/09/29}
+\def\ExplFileVersion{2.2}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\RequirePackage{xparse}
@@ -155,6 +155,9 @@
}
}
+\int_new:N \l__statistics_table_maxcols_int
+\int_set:Nn \l__statistics_table_maxcols_int {0}
+
\__statistics_keys_define:nn { table } {
showonly .value_required:n = true,
showonly .code:n = \__statistics_setshow:n{#1},
@@ -175,9 +178,9 @@
},
showonly/shown .initial:n = #1,
- maxcols .int_set:N = \l__statistics_table_maxcols_int,
+ maxcols .clist_set:N = \l__statistics_table_maxcols_clist,
maxcols .value_required:n = true,
- maxcols .initial:n = 0,
+ maxcols .initial:n = ,
tablesep .tl_set:N = \l__statistics_table_sep_tl,
tablesep .value_required:n = true,
@@ -319,6 +322,9 @@
\bool_new:N \l__statistics_table_firstrow_bool
+\seq_new:N \l__statistics_store_values_seq
+\seq_new:N \l__statistics_store_counts_seq
+
\cs_generate_variant:Nn \keyval_parse:NNn { NNV }
\NewDocumentCommand \StatsTable { +O{} +m +O{} } {
\group_begin:
@@ -338,6 +344,12 @@
}{
\tl_set:Nn \l__statistics_data_tl { #2 }
}
+ \cs_set_nopar:Npn \getvalue {
+ \seq_item:Nn \l__statistics_store_values_seq
+ }
+ \cs_set_nopar:Npn \getcount {
+ \seq_item:Nn \l__statistics_store_count_seq
+ }
\fp_zero:N \l__statistics_total_fp
\keyval_parse:NNV
\__statistics_table_count:n
@@ -354,6 +366,9 @@
}
\cs_new_protected_nopar:Nn \__statistics_table_start: {
\int_zero:N \l__statistics_nbvals_int
+ \clist_pop:NNT \l__statistics_table_maxcols_clist \l_tmpa_tl {
+ \int_set:Nn \l__statistics_table_maxcols_int { \l_tmpa_tl }
+ }
\clist_map_inline:nn { values, counts, frequencies, icc, icf, dcc, dcf } {
\tl_set:cx { l__statistics_table_##1_tl } {
\exp_not:N \ensuremath { \exp_not:N \hbox {
@@ -420,6 +435,7 @@
\tl_put_right:Nn \l_tmpa_tl
{\__statistics_table_hidden_format:n}
}
+ \seq_put_right:Nn \l__statistics_store_values_seq { #1 }
\bool_if:NT \l__statistics_table_values_bool {
\tl_put_right:Nx \l__statistics_table_values_tl {
\exp_not:V \l_tmpa_tl {
@@ -429,6 +445,7 @@
}
}
}
+ \seq_put_right:Nx \l__statistics_store_counts_seq { \fp_eval:n {#2} }
\bool_if:NT \l__statistics_table_counts_bool {
\tl_put_right:Nx \l__statistics_table_counts_tl {
\exp_not:V \l_tmpa_tl {
@@ -757,7 +774,7 @@
counts/format = { \num{#1} },
counts/axis = { ticks~and~grid={
- many, int~about~strategy, integer~minor~steps,
+ many, int~about~strategy, integer~minor~steps*,
} },
comb/counts/label = \countname,
cumulative/counts/label = \ccountname,
@@ -771,7 +788,10 @@
histogram/y/axis = {ticks = none},
histogram/y/autostep = 1,
histogram/legend = { x=, y=0, w=\xstep },
- histogram/style = { semithick, black, fill=black, fill~opacity=0.1 },
+ histogram/style = {
+ every~path/.prefix~style=fill,
+ semithick, black, fill=black, fill~opacity=0.1
+ },
histogram/areas,
histogram/areas/style = { auto, font=\small },
@@ -886,6 +906,18 @@ integer~minor~steps/.style={
}
},
integer~minor~steps/.default=50,
+integer~minor~steps*/.style={
+ compute~step/.append = {
+ \tl_set_eq:NN \l_tmpa_tl \tikz@lib@dv@step
+ \tl_if_eq:NNF \l_tmpa_tl \relax {
+ \fp_compare:nT { \l_tmpa_tl < 1 } {
+ \tl_set:Nx \tikz@lib@dv@step {1}
+ }
+ }
+ },
+ integer~minor~steps=#1,
+},
+integer~minor~steps*/.default=50,
}
\bool_new:N \l__statistics_graph_allranges_bool
@@ -920,7 +952,7 @@ integer~minor~steps/.default=50,
\fp_gset:Nn \g__statistics_graph_xstep_fp
{ \tl_use:c {\l_tmpa_tl} }
}{
- \fp_gset:Nn \g__statistics_graph_xstep_fp { \c_one }
+ \fp_gset:Nn \g__statistics_graph_xstep_fp { \c_one_int }
}
\__statistics_setup:nn { graph } { #1, #3 }
\tl_if_single:nTF { #2 } {
@@ -1148,9 +1180,8 @@ integer~minor~steps/.default=50,
\exp_not:n { , visualize~as~line = histogram,
histogram = } {
\exp_not:n { polygon, style = } {
- \exp_not:n { every~path/.append~style = } {
\exp_not:V \l__statistics_graph_options_histogram_tl
- } } }
+ } }
\exp_not:n { ] data [set = histogram, format = TeX~code] } {
\exp_not:V \l__statistics_graph_tikzdata_tl
}
@@ -1258,9 +1289,8 @@ integer~minor~steps/.default=50,
\exp_not:n { , visualize~as~line = bar~graph,
bar~graph = } {
\exp_not:n { style = } {
- \exp_not:n { every~path/.append~style = } {
\exp_not:V \l__statistics_graph_options_comb_tl
- } } }
+ } }
\exp_not:n { ] data [set = bar~graph, format = TeX~code] } {
\exp_not:V \l__statistics_graph_tikzdata_tl
}
@@ -1368,9 +1398,8 @@ integer~minor~steps/.default=50,
\exp_not:n { , visualize~as~line = cumulative,
cumulative = } {
\exp_not:n { style = } {
- \exp_not:n { every~path/.append~style = } {
\exp_not:V \l__statistics_graph_options_cumulative_tl
- } } }
+ } }
\exp_not:n { ] data [set = cumulative, format = TeX~code] } {
\exp_not:V \l__statistics_graph_tikzdata_tl
}