|
From: <ap...@us...> - 2026-05-09 18:23:32
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima CAS".
The branch, master has been updated
via 82bb04932ed18973fc61a8f7dcf221108f970814 (commit)
from cfead0feb068492b88ed3dbabbb085792dcec55a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 82bb04932ed18973fc61a8f7dcf221108f970814
Author: Robert Dodier <rob...@so...>
Date: Sat May 9 11:20:57 2026 -0700
rtest_statgraph.mac: put a title on each plot, keeping track of how many plots there are.
diff --git a/share/descriptive/rtest_statgraph.mac b/share/descriptive/rtest_statgraph.mac
index 2e70c3ba5..bef784707 100644
--- a/share/descriptive/rtest_statgraph.mac
+++ b/share/descriptive/rtest_statgraph.mac
@@ -6,16 +6,41 @@
* (2) or noninteractively:
* batch ("rtest_statgraph.mac");
*
- * Maxima waits for the user to close the Openmath window
- * before proceeding, but otherwise it just blazes through.
+ * draw_renderer is set to gnuplot.
+ * On my Linux system, that causes Gnuplot to open a new window
+ * for each plot. I think that's desirable, so that one can
+ * inspect the plots afterwards.
*/
-load("descriptive");
-load("distrib");
+"Some preparations for the following plots." $
+
+(load("descriptive"),
+ load("distrib"),
+ draw_renderer: 'gnuplot,
+ cache_all_titles (['L]) :=
+ block ([n: length (L)],
+ for k thru n
+ do title_cache[L[k]]: printf (false, "plot ~d/~d, ~a", k, n, sanitize (L[k]))),
+ sanitize (s) := ssubst ("\\_", "_", s),
+ cache_all_titles (
+ "barsplot: Ages in biomed.data",
+ "barsplot: Two random samples",
+ "barsplot: Asking for something in four groups, separate bars",
+ "barsplot: Asking for something in four groups, stacked bars",
+ "barsplot: Random data, blue bars",
+ "barsplot: Random data, red bars",
+ "boxplot: Windspeed in knots from wind.data",
+ "boxplot: Horizontal boxes",
+ "histogram: pi digits from pidigits.data",
+ "histogram + explicit: Random data from normal distribution",
+ "piechart: Digit frequencies in pi from pidigits.data",
+ "scatterplot: 1-dimensional random data",
+ "starplot: Two random samples"
+ ));
barsplot(
col(m,2),
- title = "Ages",
+ title = title_cache ["barsplot: Ages in biomed.data"],
xlabel = "years",
box_width = 1/2,
fill_density = 3/4), m : read_matrix (file_search ("biomed.data"));
@@ -23,6 +48,7 @@ barsplot(
barsplot(
l1,l2,
+ title = title_cache ["barsplot: Two random samples"],
box_width = 1,
fill_density = 1,
bars_colors = [black, grey],
@@ -37,7 +63,7 @@ barsplot(
makelist([Yes, No, Maybe][random(3)+1],k,1,50),
makelist([Yes, No, Maybe][random(3)+1],k,1,50),
makelist([Yes, No, Maybe][random(3)+1],k,1,50),
- title = "Asking for something to four groups",
+ title = title_cache ["barsplot: Asking for something in four groups, separate bars"],
ylabel = "# of individuals",
groups_gap = 3,
fill_density = 0.5,
@@ -48,7 +74,7 @@ barsplot(
makelist([Yes, No, Maybe][random(3)+1],k,1,50),
makelist([Yes, No, Maybe][random(3)+1],k,1,50),
makelist([Yes, No, Maybe][random(3)+1],k,1,50),
- title = "Asking for something to four groups",
+ title = title_cache ["barsplot: Asking for something in four groups, stacked bars"],
ylabel = "# of individuals",
grouping = stacked,
fill_density = 0.5,
@@ -60,6 +86,7 @@ block([l1:makelist(random(10),k,1,50),
bp1 :
barsplot_description(
l1,
+ title = title_cache ["barsplot: Random data, blue bars"],
box_width = 1,
fill_density = 0.5,
bars_colors = [blue],
@@ -67,6 +94,7 @@ block([l1:makelist(random(10),k,1,50),
bp2 :
barsplot_description(
l2,
+ title = title_cache ["barsplot: Random data, red bars"],
box_width = 1,
fill_density = 0.5,
bars_colors = [red],
@@ -76,13 +104,15 @@ block([l1:makelist(random(10),k,1,50),
boxplot(s2,
box_width = 0.2,
- title = "Windspeed in knots",
+ title = title_cache ["boxplot: Windspeed in knots from wind.data"],
xlabel = "Stations",
color = red,
line_width = 2), s2 : read_matrix(file_search("wind.data"));
-boxplot (A, box_orientation = horizontal), A :
- [[6, 4, 6, 2, 4, 8, 6, 4, 6, 4, 3, 2],
+boxplot (A,
+ box_orientation = horizontal,
+ title = title_cache ["boxplot: Horizontal boxes"]),
+ A : [[6, 4, 6, 2, 4, 8, 6, 4, 6, 4, 3, 2],
[8, 10, 7, 9, 12, 8, 10],
[16, 13, 17, 12, 11, 18, 13, 18, 14, 12]];
@@ -90,7 +120,7 @@ boxplot (A, box_orientation = horizontal), A :
histogram (
s1,
nclasses = 8,
- title = "pi digits",
+ title = title_cache ["histogram: pi digits from pidigits.data"],
xlabel = "digits",
ylabel = "Absolute frequency",
fill_color = grey,
@@ -101,6 +131,7 @@ block([m: 14, s: 2, s2],
draw2d(
grid = true,
xrange = [5, 25],
+ title = title_cache ["histogram + explicit: Random data from normal distribution"],
histogram_description(
s2,
nclasses = 9,
@@ -112,10 +143,12 @@ piechart(
s1,
xrange = [-1.1, 1.3],
yrange = [-1.1, 1.1],
- title = "Digit frequencies in pi"), s1 : read_list (file_search ("pidigits.data"));
+ title = title_cache ["piechart: Digit frequencies in pi from pidigits.data"]),
+ s1 : read_list (file_search ("pidigits.data"));
scatterplot(
random_normal(0,1,200),
+ title = title_cache ["scatterplot: 1-dimensional random data"],
xaxis = true,
point_size = 2,
dimensions = [600,150])$
@@ -124,6 +157,7 @@ block([l1: makelist(random(10),k,1,50),
l2: makelist(random(10),k,1,200)],
starplot(
l1, l2,
+ title = title_cache ["starplot: Two random samples"],
stars_colors = [blue,red],
sample_keys = ["1st sample", "2nd sample"],
star_center = [1,2],
-----------------------------------------------------------------------
Summary of changes:
share/descriptive/rtest_statgraph.mac | 58 +++++++++++++++++++++++++++--------
1 file changed, 46 insertions(+), 12 deletions(-)
hooks/post-receive
--
Maxima CAS
|