I am trying to overlay an ArrayPlot onto a WaveletScalogram, using the helpful answer here; however, my ArrayPlot is one-dimensional.

My code:

  WaveletScalogram[trainWaveData["A1 HbO"], Ticks -> Full, PlotLabel -> "A1 HbO"],
  ArrayPlot[{trainLabel}, DataRange -> {{0, 100}, {-1, 0}}]

trainLabel looks like {1.0, 0.0, 1.0, 1.0, ...}.

I get the following error:

Power::infy: Infinite expression 1/0 encountered.

This happens for any DataRange I give. I'm not sure what to do. Can I put in a dummy row for it to fill, or is there a more elegant way?


closed as off-topic by Jason B., gpap, MarcoB, m_goldberg, user9660 Nov 17 '15 at 16:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – Jason B., gpap, MarcoB, m_goldberg, Community
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ To help you with debugging, in the absence of sample data: do the two plots work separately? $\endgroup$ – J. M. will be back soon Oct 20 '15 at 20:03
  • 1
    $\begingroup$ This ArrayPlot[{RandomChoice[{0., 1.}, 200]}, DataRange -> {{0, 100}, {-1, 0}}] works fine so it must be the definition of your trainWaveData function. Without knowing how that was defined there's little that can be done to help you $\endgroup$ – gpap Nov 17 '15 at 14:14

Browse other questions tagged or ask your own question.