covartech/PRT

Fix plotting methods to take varargin (e.g., to slicer or image) to easily make nicer plots.

peterTorrione opened this issue · 0 comments

A bunch of objects (e.g. prtRv.plotPdf, plotLogPdf, classifier plots, etc.) all call

prtPlotUtilPlotGriddedEvaledFunction

or some equivalent. It would be nice if we could pass input arguments into that method cleanly. So you could specify, e.g., parameters to slice, or imagesc.

I did this in prtRv.plot so you can do:

close all;
plot(dsPrtPreProc);
hold on;
g = prtRvGmm
g.plotPdf(axis,'slicerLocations',{4,4,[0 20]},'FaceAlpha',0.5);

But it's not ideal - e.g., the first input to plotPdf is the axis limits for some reason. That should be:

g,plotPdf('axisLimits',axis,...)

The generalization of this is not straightforward to me though. Should there be:

prtUtilDefaultImagescVarargin?

Or did we miss the boat here, and we need a

prtPlotUtilPlotGriddedEvaled OBJECT?