--- myst: substitutions: bloc1: python: 1-5,16-34,37-50,53-86 cpp: 4-9,14-27,30-38,41-71 bloc2: python: 17-31 cpp: 4-5,14-24 bloc3: python: 39-44,55-58 cpp: 32-36,44-46 bloc4: python: "86" cpp: "70" bloc5: python: "90" cpp: "75" --- (use_cases_macro_dataserver_draw_qq_plot)= # Macro "**dataserverDrawQQPlot.{{extension}}**" ## Objective This macro is an example of how to produce QQ-plot for a certain number of randomly-drawn samples, providing the correct parameter values along with modified versions to illustrate the impact. ## Macro {{uranie}} {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/dataserver/use_cases/" + language + "/dataserverDrawQQPlot." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc1[language] + "\n" + "```" }} The very first step of this macro is to create a sample that will contain a {{doe}} filled with 200 locations, using various statistical laws. All the tested laws, are those available in the `drawQQPlot` method and they might depend on 2 to 4 parameters, defined a but randomly at the beginning of this piece of code. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/dataserver/use_cases/" + language + "/dataserverDrawQQPlot." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc2[language] + "\n" + "```" }} Once done, the sample is generated using `TBasicSampling` object with an LHS algorithm. On top of this, despite the plot preparation with canvas and pad generation, several variables are set to prepare the tests, as shown below {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/dataserver/use_cases/" + language + "/dataserverDrawQQPlot." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc3[language] + "\n" + "```" }} Finally, after the line of hypothesis to be tested is constructed (the first paragraph in the for loop) the `drawQQPlot` method is called for every empirical law in the following line. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/dataserver/use_cases/" + language + "/dataserverDrawQQPlot." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc4[language] + "\n" + "```" }} For the first case, when one wants to test the `TNormalDistribution` "norm" with the known parameters and a variation of each, it resumes as if this line was run: {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/dataserver/use_cases/" + language + "/dataserverDrawQQPlot." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc5[language] + "\n" + "```" }} The first field is the attribute to be tested, while the second one provides the three hypothesis with which our attribute under investigation will be compared. The third argument is the number of steps to be computed for quantiles. The result of this macro is shown below. ## Graph {{ "```{" "figure" "} " + parent_dir + "/roottest/build/uranie/doc/dataserver/use_cases/" + language + "/dataserverDrawQQPlot.png\n" ":align: center\n" ":name: usecases_dataserverDrawQQPlot\n" + figure_scale + "\n" "\n" "Graph of the macro `\"dataserverDrawQQPlot." + extension + "\"`\n" "```" }}