Skip to content Skip to sidebar Skip to footer

Using Matplotlib Polycollection To Plot Data From Csv Files

I've been trying to make a diagram using PolyCollection very similar to this one: http://matplotlib.org/examples/mplot3d/polys3d_demo.html The difference is, I want my code to read

Solution 1:

Okay, easy fix - your only problem is that because you added the PolyCollection to your axes yourself, it doesn't automatically scale the x/y/z limits to appropriate values (still shows between 0 and 1). For the data you have, if you add the following lines:

ax.set_xlim(0,5000)
ax.set_ylim(0,len(spectrumfiles))

then your data will magically appear.

data visible now

Post a Comment for "Using Matplotlib Polycollection To Plot Data From Csv Files"