0

I have some data that I'd like to represent as a spectrogram or heat-map in python 2.7. At the moment, I have an array of three columns (time, channel number and flux), and thousands of rows that represent each data point. How would I be able to plot all the data points if I want time on the x axis, channel number on the y axis, and the magnitude of the flux represented by a colour?

I've looked through a fair few questions on here, plus other resources online, and haven't been able to apply any of the answers to my own situation. Ideally I'd want something like this, just with frequency replaced by channel and also using my own data rather than generating something.

CinCout
  • 9,486
  • 12
  • 49
  • 67
Emma
  • 1
  • 1
    Possible duplicate of [Matplotlib scatterplot; colour as a function of a third variable](http://stackoverflow.com/questions/8202605/matplotlib-scatterplot-colour-as-a-function-of-a-third-variable) – SiHa Jul 12 '16 at 11:52
  • Emma, a spectrogram displays the frequency content of successive chunks of a one-dimensional vector of data, which is why scipy.signal.spectrogram takes a 1D data array and generates a 2D image, time (or whatever dimension the data was in) vs frequency. As guessed in the above comment, you may want a scatter plot, or kernel density, or heatmap, but not a spectrogram. – Ahmed Fasih Jul 15 '16 at 13:20

0 Answers0