MCPcopy Create free account
hub / github.com/biometrics/openbr / PlotLandmarking

Function PlotLandmarking

openbr/core/plot.cpp:316–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316bool PlotLandmarking(const QStringList &files, const File &destination, bool show)
317{
318 qDebug("Plotting %d landmarking file(s) to %s", files.size(), qPrintable(destination));
319 RPlot p(files, destination);
320 p.file.write("\nformatData(type=\"landmarking\")\n\n");
321 p.file.write(qPrintable(QString("algs <- uniqueBox$%1)\n").arg(p.major.size > 1 ? p.major.header : (p.minor.header.isEmpty() ? p.major.header : p.minor.header))));
322 p.file.write("algs <- algs[!duplicated(algs)]\n");
323 p.file.write("plotLandmarkSamples(samples=sample, expData=EXP, extData=EXT)\n");
324 p.file.write("plotLandmarkTables(tableData=Box)\n");
325
326 p.file.write(qPrintable(QString("ggplot(Box, aes(Y,%1%2))").arg(p.major.size > 1 ? QString(", colour=%1").arg(p.major.header) : QString(),
327 p.minor.size > 1 ? QString(", linetype=%1").arg(p.minor.header) : QString()) +
328 QString(" + annotation_logticks(sides=\"b\") + stat_ecdf() + scale_x_log10(\"Normalized Error\", breaks=c(0.001,0.01,0.1,1,10)) + scale_y_continuous(\"Cumulative Density\", label=percent) + theme_minimal()\n\n")));
329
330 p.file.write(qPrintable(QString("ggplot(Box, aes(factor(X), Y%1%2))").arg(p.major.size > 1 ? QString(", colour=%1").arg(p.major.header) : QString(), p.minor.size > 1 ? QString(", linetype=%1").arg(p.minor.header) : QString()) +
331 QString("+ annotation_logticks(sides=\"l\") + geom_boxplot(alpha=0.5) + geom_jitter(size=1, alpha=0.5) + scale_x_discrete(\"Landmark\") + scale_y_log10(\"Normalized Error\", breaks=c(0.001,0.01,0.1,1,10)) + theme_minimal()\n\n")));
332
333 p.file.write(qPrintable(QString("ggplot(Box, aes(factor(X), Y%1%2))").arg(p.major.size > 1 ? QString(", colour=%1").arg(p.major.header) : QString(), p.minor.size > 1 ? QString(", linetype=%1").arg(p.minor.header) : QString()) +
334 QString("+ annotation_logticks(sides=\"l\") + geom_violin(alpha=0.5) + scale_x_discrete(\"Landmark\") + scale_y_log10(\"Normalized Error\", breaks=c(0.001,0.01,0.1,1,10))\n\n")));
335
336 return p.finalize(show);
337}
338
339bool PlotMetadata(const QStringList &files, const QString &columns, bool show)
340{

Callers 1

br_plot_landmarkingFunction · 0.85

Calls 4

isEmptyMethod · 0.80
sizeMethod · 0.45
writeMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected