function [] = CollocInferPlots(coefs,pars,lik,proc,times,datacol,datacol,datanames,ObsPlot,DerivPlot)

%%%% NEED TO WORK OUT HOW TO DEAL WITH PRE-SPECIFYING COLORS AND NAMES

  if isempty(cols) 
      cols = 1:size(coefs,2); 
  end

 timevec = proc.more.qpts;

 traj = proc.bvals.bvals*coefs;
 colnames(traj) = proc.more.names;
 
 dtraj = proc.bvals.dbvals*coefs;

 ftraj = proc.more.fn(timevec,traj,pars,proc.more.more);
 
 otraj = lik.more.fn(timevec,traj,pars,lik.more.more);
 
 
 
 if(ObsPlot)
  if isempty(times),  times = 1:nrow(data); end
  if isempty(datacols)  
    if size(otraj,2) == size(traj,2), datacols = colsend;
    else datacols = 1:size(otraj,2); 
    end
  end
  
  figure(1)
  plot(timevec,otraj);
  xlabel('time')
  ylabel('Observations')
  if isempty(data) == 0
    if isempty(datanames), datanames = substring(colnames(data),1,1); end
    if isempty(times), times = 1:size(data,2); end
    hold on
    plot(times,data,'.')
    hold off
  end
 end
  
 if(DerivPlot)
  figure(2)
  matplot(timevec,ftraj,'-')
  xlabel('time')
  ylabel('f(x): -, dx: --')
  
  hold on
  matplot(timevec,dtraj,'--')
  ab
  legend(x='topright',legend=proc.more.names,lwd=2,lty=1,col=cols)
 
  X11()
  par(mfrow=c(2,1),mar=c(4,4,1,1))
  matplot(timevec,dtraj-ftraj,type='l',lwd=2,xlab='time',ylab='dx-f(x)',
        cex_lab=1_5,cex_axis=1_5,col=cols,lty=1)
  abline(h=0)     
  matplot(timevec,traj,type='l',lwd=2,xlab='time',ylab='x',
        cex_lab=1_5,cex_axis=1_5,col=cols,lty=1)    
  legend(x='topright',legend=proc.more.names,lwd=2,lty=1,col=cols)
 end

 return(list(timevec=timevec,traj=traj,dtraj=dtraj,ftraj=ftraj,otraj=otraj))

end