Library: example to schow the secondary diagram
...which is added automatically whenever additional data columns are present Result can only be verified visually * the upper diagram should show the first fibonacci points * a (correct) linear regression line should be overlayed in red * below, a secondary diagram should appear, with aligned axis * the row "one" in this diagram should be shown as impulses * the further rows "two" and "three" should be drawn as green points, using the secondary Y-axis (values 100-250) * Gnuplot can handle missing data points
This commit is contained in:
parent
c997fc2341
commit
96202f845a
3 changed files with 74 additions and 25 deletions
|
|
@ -153,11 +153,12 @@ if (plots > 1) {
|
|||
unset arrow 10
|
||||
unset arrow 11
|
||||
set border 2+8
|
||||
set key bmargin
|
||||
|
||||
${if Y2range}
|
||||
set yrange [${Y2range}]
|
||||
${endif
|
||||
} unset x2label
|
||||
} unset xlabel
|
||||
set format x ""
|
||||
${if Y2label
|
||||
} set ylabel '${Y2label}' ${endif
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ namespace test{
|
|||
,{6,13}
|
||||
,{7,21.55}
|
||||
}});
|
||||
cout << gnuplot <<endl;
|
||||
// cout << gnuplot <<endl;
|
||||
|
||||
CHECK (contains (gnuplot, "\"step\",\"fib\""));
|
||||
CHECK (contains (gnuplot, "7,21.55"));
|
||||
|
|
@ -123,8 +123,24 @@ namespace test{
|
|||
CHECK (contains (gnuplot, "set arrow 1 from graph 0, first regLine(STATS_min_x)"));
|
||||
CHECK (contains (gnuplot, "plot $RunData using 1:2 with points"));
|
||||
|
||||
// only one data row given => no multiplot layout
|
||||
CHECK (not contains (gnuplot, "set multiplot"));
|
||||
|
||||
gnuplot = gnuplot_gen::scatterRegression(
|
||||
CSVData{{"step","fib","one","two","three"}
|
||||
,{{0,1 , 1.0, 170,200}
|
||||
,{1,1 , 0.1, 160,210}
|
||||
,{2,2 , 1.1, 150,220}
|
||||
,{3,3 , 0.0, "" ,230}
|
||||
,{4,5 , 1.1, 130,240}
|
||||
,{5,8 , 1.2, 120,250}
|
||||
,{6,13, 1.3, 110 }
|
||||
,{7,21, 1.4, 100 }
|
||||
}});
|
||||
cout << gnuplot <<endl;
|
||||
|
||||
// more than one data row given => using multiplot layout
|
||||
CHECK (contains (gnuplot, "set multiplot"));
|
||||
CHECK (contains (gnuplot, "\"step\",\"fib\",\"one\",\"two\",\"three\""));
|
||||
CHECK (contains (gnuplot, "0,1,1,170,200"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -112386,8 +112386,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1710079820663" ID="ID_346209836" MODIFIED="1710079838390" TEXT="ein gnuplot-Skript generieren">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1710079820663" ID="ID_346209836" MODIFIED="1712107106974" TEXT="ein gnuplot-Skript generieren">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1710633755833" ID="ID_395770848" MODIFIED="1710633858137" TEXT="Grundlagen Gnuplot lernen">
|
||||
<arrowlink COLOR="#425fc8" DESTINATION="ID_1898552649" ENDARROW="Default" ENDINCLINATION="-1042;110;" ID="Arrow_ID_1130805562" STARTARROW="None" STARTINCLINATION="-1030;94;"/>
|
||||
<icon BUILTIN="info"/>
|
||||
|
|
@ -114345,7 +114345,7 @@ std::cout << tmpl.render({"what", "World"}) << s
|
|||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1711767387817" ID="ID_249731836" MODIFIED="1711815901556" TEXT="längerfristig wird es mehrere Basis-Templates geben">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1711767397471" ID="ID_1445830361" MODIFIED="1711767408302" TEXT="welche Teile sind sinnvollerweise flexibel?">
|
||||
<node COLOR="#435e98" CREATED="1711767397471" ID="ID_1445830361" MODIFIED="1712107118901" TEXT="welche Teile sind sinnvollerweise flexibel?">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1711816116763" ID="ID_1377511306" MODIFIED="1711816131828" TEXT="im konkreten Beispiel: das sekundäre Diagramm ist optional zuschaltbar"/>
|
||||
<node CREATED="1711816139855" ID="ID_152599714" MODIFIED="1711816150762" TEXT="die Linestyles werden komplett als Baustein injiziert"/>
|
||||
|
|
@ -114443,14 +114443,14 @@ std::cout << tmpl.render({"what", "World"}) << s
|
|||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1711900330296" ID="ID_1080765414" MODIFIED="1711900374682" TEXT="typischerweise: Familie von Aufruf-Front-ends">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1711900330296" ID="ID_1080765414" MODIFIED="1712107097941" TEXT="typischerweise: Familie von Aufruf-Front-ends">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1711900349274" ID="ID_1386251374" MODIFIED="1711900360595" TEXT="der eigentliche Aufruf kann mit einem Rec::Mutator erfolgen"/>
|
||||
<node CREATED="1711900361616" ID="ID_1245877883" MODIFIED="1711900371643" TEXT="dann gibt es zusätzliche Builder, die schon Teile vorbereiten"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1711820846814" ID="ID_131434294" MODIFIED="1711821174833" TEXT="Template-Bausteine">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1711820846814" ID="ID_131434294" MODIFIED="1712107103288" TEXT="Template-Bausteine">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1711820852404" ID="ID_1098550176" MODIFIED="1711904777126" TEXT="einfacher Daten-Plot">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1711820876736" ID="ID_1449855332" MODIFIED="1711820912379" TEXT="gemeinsame Abszisse + 1...9 Datenreihen"/>
|
||||
|
|
@ -114507,7 +114507,9 @@ std::cout << tmpl.render({"what", "World"}) << s
|
|||
</node>
|
||||
<node COLOR="#338800" CREATED="1712100586841" ID="ID_1585686206" MODIFIED="1712105195332" TEXT="Flexibilität schaffen">
|
||||
<icon BUILTIN="yes"/>
|
||||
<node CREATED="1712100629386" ID="ID_1231784651" MODIFIED="1712100658602" TEXT="Die Zahl der Datenspalten als Layout-Steuervariable verwenden"/>
|
||||
<node BACKGROUND_COLOR="#c8c0b6" COLOR="#2322a3" CREATED="1712100629386" ID="ID_1231784651" MODIFIED="1712107218965" TEXT="Die Zahl der Datenspalten als Layout-Steuervariable verwenden">
|
||||
<linktarget COLOR="#506aca" DESTINATION="ID_1231784651" ENDARROW="Default" ENDINCLINATION="-360;16;" ID="Arrow_ID_1015977173" SOURCE="ID_1362230214" STARTARROW="None" STARTINCLINATION="188;-38;"/>
|
||||
</node>
|
||||
<node CREATED="1712100660810" ID="ID_1873990314" MODIFIED="1712100721346" TEXT="User hat dafür zu sorgen, daß diese Datenspalten in der ersten Datenzeile gegeben sind">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
|
|
@ -114567,30 +114569,31 @@ std::cout << tmpl.render({"what", "World"}) << s
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1710079848190" ID="ID_227233521" MODIFIED="1711904804957" TEXT="Darstellung ausarbeiten">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1710079848190" ID="ID_227233521" MODIFIED="1712107151062" TEXT="Darstellung ausarbeiten">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1711904787566" ID="ID_1933798904" MODIFIED="1711904792520" TEXT="einfacher Daten-Plot">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1710079926851" ID="ID_1457237228" MODIFIED="1710079939594" TEXT="Scatter-Plot">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1710079926851" ID="ID_1457237228" MODIFIED="1712107144084" TEXT="Scatter-Plot">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1710079932704" ID="ID_1073652291" MODIFIED="1710079939594" TEXT="Regressionslinie">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1710079932704" ID="ID_1073652291" MODIFIED="1712107147466" TEXT="Regressionslinie">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1710079942505" ID="ID_1703688749" MODIFIED="1710080060314" TEXT="Darstellung für sekundäre Werte">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1710079942505" ID="ID_1703688749" MODIFIED="1712107150316" TEXT="Darstellung für sekundäre Werte">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1710080061651" ID="ID_1708271153" MODIFIED="1710080077627" TEXT="∅ concurrency"/>
|
||||
<node CREATED="1710080078359" ID="ID_1753709562" MODIFIED="1710080082366" TEXT="∅ job time"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1710080104427" ID="ID_1362230214" MODIFIED="1710080121358" TEXT="sollte erweiterbar sein">
|
||||
<node COLOR="#435e98" CREATED="1710080104427" ID="ID_1362230214" MODIFIED="1712107201303" TEXT="ist erweiterbar">
|
||||
<arrowlink COLOR="#506aca" DESTINATION="ID_1231784651" ENDARROW="Default" ENDINCLINATION="-360;16;" ID="Arrow_ID_1015977173" STARTARROW="None" STARTINCLINATION="188;-38;"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1711820647889" ID="ID_149856563" MODIFIED="1711845599165" TEXT="GnuplotGen_test">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1711820662341" ID="ID_1728359549" MODIFIED="1711845597133" TEXT="einfachster Testfall: ein Daten-Punkt-Plot">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1711820662341" ID="ID_1728359549" MODIFIED="1712107237930" TEXT="einfachster Testfall: ein Daten-Punkt-Plot">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1711845516384" ID="ID_1778551442" MODIFIED="1711845526641" TEXT="kann einfaches Diagramm generieren">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
|
|
@ -114603,8 +114606,37 @@ std::cout << tmpl.render({"what", "World"}) << s
|
|||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1711845539821" ID="ID_1805048889" MODIFIED="1711845580237" TEXT="einige Bestandteile verifizieren">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1711845539821" ID="ID_1805048889" MODIFIED="1712107236895" TEXT="einige Bestandteile verifizieren">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1712107249502" ID="ID_758586411" MODIFIED="1712107251833" TEXT="plot_scatter_regression">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#5b280f" CREATED="1712107263609" ID="ID_1696889047" MODIFIED="1712107278412" TEXT="Verifikation hat ihre Grenzen">
|
||||
<icon BUILTIN="yes"/>
|
||||
<icon BUILTIN="stop-sign"/>
|
||||
<node CREATED="1712107282261" ID="ID_848988536" MODIFIED="1712107365616" TEXT="bedingt durch die Logik im Gnuplot-Skript">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
man kann hier eigentlich nur stichprobenartig verifizieren, daß das jeweilige Template zum Einsatz kam, und daß einige markante Werte per Text-Templating eingebaut wurden. Also z.B. die Datenheader, oder eine Achsenbeschriftung.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node COLOR="#5b280f" CREATED="1712107290460" ID="ID_352326813" MODIFIED="1712107309763" TEXT="wir können / wollen nicht Gnuplot in der Testsuite aufrufen">
|
||||
<icon BUILTIN="closed"/>
|
||||
</node>
|
||||
<node COLOR="#5b280f" CREATED="1712107436066" ID="ID_11426036" MODIFIED="1712107460789" TEXT="es ist nicht sinnvoll, das Skript literal zu verifzieren (da unflexibel)">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node COLOR="#435e98" CREATED="1712107385138" ID="ID_156205108" MODIFIED="1712107426233" TEXT="letztlich bleibt nur, das Resultat visuell zu prüfen">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue