Commit dd5175f2f8c7f88a62751c38ad7c61aad3bd6265

Authored by Josh Klontz
1 parent f826f9b4

min/max CMC lines now controlled by uncertainty flag

Showing 1 changed file with 2 additions and 1 deletions
openbr/core/plot.cpp
... ... @@ -219,6 +219,7 @@ bool Plot(const QStringList &files, const File &destination, bool show)
219 219 qDebug("Plotting %d file(s) to %s", files.size(), qPrintable(destination));
220 220  
221 221 const bool minimalist = destination.getBool("minimalist");
  222 + const bool uncertainty = destination.get<bool>("uncertainty");
222 223  
223 224 // Use a br::file for simple storage of plot options
224 225 File cmcOpts;
... ... @@ -268,7 +269,7 @@ bool Plot(const QStringList &amp;files, const File &amp;destination, bool show)
268 269 QString(" + theme(aspect.ratio=1)\n\n")));
269 270  
270 271 p.file.write(qPrintable(QString("ggplot(CMC, aes(x=X, y=Y%1%2)) + ggtitle(\"%3\") + xlab(\"Rank\") + ylab(\"Retrieval Rate\")").arg(p.major.size > 1 ? QString(" ,colour=factor(%1)").arg(p.major.header) : QString(), p.minor.size > 1 ? QString(", linetype=factor(%1)").arg(p.minor.header) : QString(), cmcOpts.get<QString>("title",QString())) +
271   - QString(((p.major.smooth || p.minor.smooth) ? (minimalist ? " + stat_summary(geom=\"line\", fun.y=mean, size=%1)" : " + stat_summary(geom=\"line\", fun.y=min, aes(linetype=\"Min/Max\"), size=%1) + stat_summary(geom=\"line\", "
  272 + QString(((p.major.smooth || p.minor.smooth) ? (!uncertainty ? " + stat_summary(geom=\"line\", fun.y=mean, size=%1)" : " + stat_summary(geom=\"line\", fun.y=min, aes(linetype=\"Min/Max\"), size=%1) + stat_summary(geom=\"line\", "
272 273 "fun.y=max, aes(linetype=\"Min/Max\"), size=%1) + stat_summary(geom=\"line\", fun.y=mean, aes(linetype=\"Mean\"), size=%1) + scale_linetype_manual(\"Legend\", values=c(\"Mean\"=1, \"Min/Max\"=2))") : " + geom_line(size=%1)")).arg(QString::number(cmcOpts.get<float>("thickness",1))) +
273 274 (minimalist ? "" : " + scale_x_log10(labels=c(1,5,10,50,100), breaks=c(1,5,10,50,100)) + annotation_logticks(sides=\"b\")") +
274 275 (p.major.size > 1 ? getScale("colour", p.major.header, p.major.size) : QString()) +
... ...