In a Package I am writing, I'm trying to define a function with an Optional parameter in it that is set to a global variable.
PlotIndex[IndexLoopPlotMtx_:IndexLoopPlot]:=ListPlot[.....
However, the Optional value IndexLoopPlot is not set until after the package is loaded and other functions are run. Therefore PlotIndex is read in as,
PlotIndex[IndexLoopPlotMtx_:{}]:=ListPlot[.....
In other words, IndexLoopPlotMtx is set to Null, and when the function is run later it tries to plot {} instead of the matrix IndexLoopPlot. Is there a way to get it delay setting the Default until the function is called for the first time from the package?

