Commit 83dd836b00735cff93ba6e824c7e364ac3facd7c

Authored by Josh Klontz
1 parent 1a424f80

plot tweaks

Showing 1 changed file with 5 additions and 5 deletions
sdk/core/plot.cpp
... ... @@ -443,7 +443,7 @@ bool Plot(const QStringList &files, const br::File &destination, bool show)
443 443  
444 444 RPlot p(files, destination);
445 445  
446   - p.file.write(qPrintable(QString("qplot(X, 1-Y, data=DET, geom=\"%1\"").arg((p.major.smooth || p.minor.smooth) ? "smooth" : "line") +
  446 + p.file.write(qPrintable(QString("qplot(X, 1-Y, data=DET%1").arg((p.major.smooth || p.minor.smooth) ? ", geom=\"smooth\", method=loess, level=0.99" : ", geom=\"line\"") +
447 447 (p.major.size > 1 ? QString(", colour=factor(%1)").arg(p.major.header) : QString()) +
448 448 (p.minor.size > 1 ? QString(", linetype=factor(%1)").arg(p.minor.header) : QString()) +
449 449 QString(", xlab=\"False Accept Rate\", ylab=\"True Accept Rate\") + theme_minimal()") +
... ... @@ -452,7 +452,7 @@ bool Plot(const QStringList &files, const br::File &destination, bool show)
452 452 QString(" + scale_x_log10() + scale_y_continuous(labels=percent)") +
453 453 QString("\nggsave(\"%1\")\n").arg(p.subfile("ROC"))));
454 454  
455   - p.file.write(qPrintable(QString("qplot(X, Y, data=DET, geom=\"%1\"").arg((p.major.smooth || p.minor.smooth) ? "smooth" : "line") +
  455 + p.file.write(qPrintable(QString("qplot(X, Y, data=DET%1").arg((p.major.smooth || p.minor.smooth) ? ", geom=\"smooth\", method=loess, level=0.99" : ", geom=\"line\"") +
456 456 (p.major.size > 1 ? QString(", colour=factor(%1)").arg(p.major.header) : QString()) +
457 457 (p.minor.size > 1 ? QString(", linetype=factor(%1)").arg(p.minor.header) : QString()) +
458 458 QString(", xlab=\"False Accept Rate\", ylab=\"False Reject Rate\") + geom_abline(alpha=0.5, colour=\"grey\", linetype=\"dashed\") + theme_minimal()") +
... ... @@ -469,7 +469,7 @@ bool Plot(const QStringList &files, const br::File &destination, bool show)
469 469 QString(" + theme(aspect.ratio=1)") +
470 470 QString("\nggsave(\"%1\")\n").arg(p.subfile("SD"))));
471 471  
472   - p.file.write(qPrintable(QString("qplot(X, Y, data=CMC, geom=\"%1\", xlab=\"Rank\", ylab=\"Retrieval Rate\"").arg((p.major.smooth || p.minor.smooth) ? "smooth" : "line") +
  472 + p.file.write(qPrintable(QString("qplot(X, Y, data=CMC%1, xlab=\"Rank\", ylab=\"Retrieval Rate\"").arg((p.major.smooth || p.minor.smooth) ? ", geom=\"smooth\", method=loess, level=0.99" : ", geom=\"line\"") +
473 473 (p.major.size > 1 ? QString(", colour=factor(%1)").arg(p.major.header) : QString()) +
474 474 (p.minor.size > 1 ? QString(", linetype=factor(%1)").arg(p.minor.header) : QString()) +
475 475 QString(") + theme_minimal() + scale_x_continuous(limits = c(1,25), breaks = c(1,5,10,25))") +
... ... @@ -478,7 +478,7 @@ bool Plot(const QStringList &files, const br::File &destination, bool show)
478 478 QString(" + scale_y_continuous(labels=percent)") +
479 479 QString("\nggsave(\"%1\")\n").arg(p.subfile("CMC"))));
480 480  
481   - p.file.write(qPrintable(QString("qplot(factor(%1)%2, data=BC, %3").arg(p.major.header, (p.major.smooth || p.minor.smooth) ? ", Y" : "", (p.major.smooth || p.minor.smooth) ? "geom=\"boxplot\"" : "geom=\"bar\", position=\"dodge\", weight=Y") +
  481 + p.file.write(qPrintable(QString("qplot(factor(%1)%2, data=BC, %3").arg(p.major.smooth ? (p.minor.header.isEmpty() ? "Algorithm" : p.minor.header) : p.major.header, (p.major.smooth || p.minor.smooth) ? ", Y" : "", (p.major.smooth || p.minor.smooth) ? "geom=\"boxplot\"" : "geom=\"bar\", position=\"dodge\", weight=Y") +
482 482 (p.major.size > 1 ? QString(", fill=factor(%1)").arg(p.major.header) : QString()) +
483 483 QString(", xlab=\"%1False Accept Rate\"").arg(p.major.size > 1 ? p.major.header + " / " : QString()) +
484 484 QString(", ylab=\"True Accept Rate%1\") + theme_minimal()").arg(p.minor.size > 1 ? " / " + p.minor.header : QString()) +
... ... @@ -487,7 +487,7 @@ bool Plot(const QStringList &files, const br::File &destination, bool show)
487 487 QString(" + scale_y_continuous(labels=percent) + theme(legend.position=\"none\", axis.text.x=element_text(angle=-90, hjust=0))%1").arg((p.major.smooth || p.minor.smooth) ? "" : " + geom_text(data=BC, aes(label=Y, y=0.05))") +
488 488 QString("\nggsave(\"%1\")\n").arg(p.subfile("BC"))));
489 489  
490   - p.file.write(qPrintable(QString("qplot(X, Y, data=ERR, geom=\"%1\", linetype=Error").arg((p.major.smooth || p.minor.smooth) ? "smooth" : "line") +
  490 + p.file.write(qPrintable(QString("qplot(X, Y, data=ERR%1, linetype=Error").arg((p.major.smooth || p.minor.smooth) ? ", geom=\"smooth\", method=loess, level=0.99" : ", geom=\"line\"") +
491 491 ((p.flip ? p.major.size : p.minor.size) > 1 ? QString(", colour=factor(%1)").arg(p.flip ? p.major.header : p.minor.header) : QString()) +
492 492 QString(", xlab=\"Score%1\", ylab=\"Error Rate\") + theme_minimal()").arg((p.flip ? p.minor.size : p.major.size) > 1 ? " / " + (p.flip ? p.minor.header : p.major.header) : QString()) +
493 493 ((p.flip ? p.major.size : p.minor.size) > 1 ? getScale("colour", p.flip ? p.major.header : p.minor.header, p.flip ? p.major.size : p.minor.size) : QString()) +
... ...