Commit de2f185dcd193a2103fbb180f664cce066a4f5b7
1 parent
345b9eee
updated ggplot2 commands
Showing
2 changed files
with
6 additions
and
6 deletions
sdk/core/plot.cpp
| ... | ... | @@ -449,9 +449,9 @@ bool br::Plot(const QStringList &files, const QString &destination, bool show) |
| 449 | 449 | p.file.write(qPrintable(QString("qplot(X, data=SD, geom=\"histogram\", fill=Y, position=\"identity\", alpha=I(1/2)") + |
| 450 | 450 | QString(", xlab=\"Score%1\"").arg((p.flip ? p.majorSize : p.minorSize) > 1 ? " / " + (p.flip ? p.majorHeader : p.minorHeader) : QString()) + |
| 451 | 451 | QString(", ylab=\"Frequency%1\"").arg((p.flip ? p.minorSize : p.majorSize) > 1 ? " / " + (p.flip ? p.minorHeader : p.majorHeader) : QString()) + |
| 452 | - QString(") + scale_fill_manual(\"Ground Truth\", values=c(\"blue\", \"red\")) + theme_bw() + scale_x_continuous(minor_breaks=NULL) + scale_y_continuous(minor_breaks=NULL) + opts(axis.text.y=theme_blank(), axis.ticks=theme_blank(), axis.text.x=theme_text(angle=-90, hjust=0))") + | |
| 452 | + QString(") + scale_fill_manual(\"Ground Truth\", values=c(\"blue\", \"red\")) + theme_bw() + scale_x_continuous(minor_breaks=NULL) + scale_y_continuous(minor_breaks=NULL) + theme(axis.text.y=element_blank(), axis.ticks=element_blank(), axis.text.x=element_text(angle=-90, hjust=0))") + | |
| 453 | 453 | (p.majorSize > 1 ? (p.minorSize > 1 ? QString(" + facet_grid(%2 ~ %1, scales=\"free\")").arg((p.flip ? p.majorHeader : p.minorHeader), (p.flip ? p.minorHeader : p.majorHeader)) : QString(" + facet_wrap(~ %1, scales = \"free\")").arg(p.majorHeader)) : QString()) + |
| 454 | - QString(" + opts(aspect.ratio=1)") + | |
| 454 | + QString(" + theme(aspect.ratio=1)") + | |
| 455 | 455 | QString("\nggsave(\"%1\")\n").arg(p.subfile("SD")))); |
| 456 | 456 | |
| 457 | 457 | p.file.write(qPrintable(QString("qplot(X, Y, data=CMC, geom=\"line\", xlab=\"Rank\", ylab=\"Retrieval Rate\"") + |
| ... | ... | @@ -469,7 +469,7 @@ bool br::Plot(const QStringList &files, const QString &destination, bool show) |
| 469 | 469 | QString(", ylab=\"True Accept Rate%1\") + theme_bw()").arg(p.minorSize > 1 ? " / " + p.minorHeader : QString()) + |
| 470 | 470 | (p.majorSize > 1 ? getScale("fill", p.majorHeader, p.majorSize) : QString()) + |
| 471 | 471 | (p.minorSize > 1 ? QString(" + facet_grid(%2 ~ X)").arg(p.minorHeader) : QString(" + facet_wrap(~ X)")) + |
| 472 | - QString(" + opts(legend.position=\"none\", axis.text.x=theme_text(angle=-90, hjust=0)) + geom_text(data=BC, aes(label=Y, y=0.05))") + | |
| 472 | + QString(" + theme(legend.position=\"none\", axis.text.x=element_text(angle=-90, hjust=0)) + geom_text(data=BC, aes(label=Y, y=0.05))") + | |
| 473 | 473 | QString("\nggsave(\"%1\")\n").arg(p.subfile("BC")))); |
| 474 | 474 | |
| 475 | 475 | p.file.write(qPrintable(QString("qplot(X, Y, data=FAR, geom=\"line\"") + |
| ... | ... | @@ -478,7 +478,7 @@ bool br::Plot(const QStringList &files, const QString &destination, bool show) |
| 478 | 478 | ((p.flip ? p.majorSize : p.minorSize) > 1 ? getScale("colour", p.flip ? p.majorHeader : p.minorHeader, p.flip ? p.majorSize : p.minorSize) : QString()) + |
| 479 | 479 | QString(" + scale_y_continuous(trans=\"log10\")") + |
| 480 | 480 | ((p.flip ? p.minorSize : p.majorSize) > 1 ? QString(" + facet_wrap(~ %1, scales=\"free_x\")").arg(p.flip ? p.minorHeader : p.majorHeader) : QString()) + |
| 481 | - QString(" + opts(aspect.ratio=1)") + | |
| 481 | + QString(" + theme(aspect.ratio=1)") + | |
| 482 | 482 | QString("\nggsave(\"%1\")\n").arg(p.subfile("FAR")))); |
| 483 | 483 | |
| 484 | 484 | p.file.write(qPrintable(QString("qplot(X, Y, data=FRR, geom=\"line\"") + |
| ... | ... | @@ -487,7 +487,7 @@ bool br::Plot(const QStringList &files, const QString &destination, bool show) |
| 487 | 487 | ((p.flip ? p.majorSize : p.minorSize) > 1 ? getScale("colour", p.flip ? p.majorHeader : p.minorHeader, p.flip ? p.majorSize : p.minorSize) : QString()) + |
| 488 | 488 | QString(" + scale_y_continuous(trans=\"log10\")") + |
| 489 | 489 | ((p.flip ? p.minorSize : p.majorSize) > 1 ? QString(" + facet_wrap(~ %1, scales=\"free_x\")").arg(p.flip ? p.minorHeader : p.majorHeader) : QString()) + |
| 490 | - QString(" + opts(aspect.ratio=1)") + | |
| 490 | + QString(" + theme(aspect.ratio=1)") + | |
| 491 | 491 | QString("\nggsave(\"%1\")\n").arg(p.subfile("FRR")))); |
| 492 | 492 | |
| 493 | 493 | return p.finalize(show); | ... | ... |