1

I am working with a big set of data (240, 131000) and bigger. I am currently using the code below to plot this.

fig,ax = pyplot.subplots()
spectrum = ax.pcolor(waterfallplot, cmap='viridis')
pyplot.colorbar()
pyplot.show()

However, it's taking a very long time (30 min+) and the plot still hasn't shown up yet. A quick breakpoint check says the code gets to the spectrum= line, but doesn't go past. Looking at the memory on my computer, it hasn't even gotten close to the limit.

Does anyone have a better way of doing this?

smci
  • 32,567
  • 20
  • 113
  • 146
SanticL
  • 56
  • 2
  • 8
  • You should add the tag related to the library you're using to plot... – nbro Aug 15 '16 at 19:00
  • @nbro Thank you! I added it. – SanticL Aug 15 '16 at 19:06
  • Did you check [this](http://stackoverflow.com/questions/7470288/matplotlib-pcolor-very-slow-alternatives) and [this](http://matplotlib.org/examples/pylab_examples/pcolor_demo.html)? – sascha Aug 15 '16 at 19:10
  • @sascha I started at the second one in my research and that was after I exhausted `imshow` possibilities. I will look into `pcolormesh`, but do you have any other suggestions? – SanticL Aug 15 '16 at 19:19
  • No, but i'm pretty sure, one of these 4 approaches will help you. – sascha Aug 15 '16 at 19:42
  • @sascha `pcolorfast` did what I was wanting. I must have overlooked it the first 8 times I read that one. Thank you! :) – SanticL Aug 15 '16 at 19:51

1 Answers1

0

pcolorfast works best for large arrays and updates quickly.

SanticL
  • 56
  • 2
  • 8