% 
% 
function plotVariousAttributes( posData, key, ctrl, abscissa )


if ( ctrl.plotVarious )
  disp('Plotting miscellaneous data');
else
  disp('Skipping plots of miscellaneous data');
  return;
end


% Extract columns
nsvUsed = posData(:,key.NUSED); 
nsvTracked = posData(:,key.NTRK); 
pdop = posData(:,key.PDOP); 
fixmode = posData(:,key.FIXMODE);
fixtype = posData(:,key.FIXTYPE);
raim = posData(:,key.RAIM);

for verticalView = 0:1
  % Generate Plots
  figHandle = newfigure('Visible',ctrl.plotsVisible); 

  if (verticalView)
    subplot(3,1,1);
  else
    subplot(2,2,1);
  end
  plot( abscissa.time, nsvTracked, 'b*' );
  hold on; 
  plot( abscissa.time, nsvUsed,'r.' );
  title('num SVs ( tracked=b*, used=r. )');
  xlabel(abscissa.timeString);
  xlim(abscissa.limits);
  ylabel('SVs');
  grid on;

  if (verticalView)
    subplot(3,1,2);
  else
    subplot(2,2,2);
  end
  plot( abscissa.time, pdop, '.' );
  title('PDOP');
  xlabel(abscissa.timeString);
  xlim(abscissa.limits);
  ylabel('PDOP');
  grid on; 

  if (verticalView)
    subplot(3,1,3);
  else
    subplot(2,2,3);
  end
  plot( abscissa.time, fixmode, 'b.');
  hold on;
  plot( abscissa.time, fixtype, 'r.');
  plot( abscissa.time, raim/100, 'k.');
  title('FixMode(b), CorrType(r), RAIM(k)/100');
  xlabel(abscissa.timeString);
  xlim(abscissa.limits);
  ylabel('enumerated value');
  grid on; 

  suptitle ('Various Attributes');

  if ( verticalView )
    printPngPlot( 'VertEpocherr.png', ctrl.printPlots, verticalView );
  else
    printPngPlot( 'Epocherr.png', ctrl.printPlots, verticalView );
  end
  
  if ~ctrl.viewPlots
    close;
  end
end


end
