python - Matplotlib: How to increase size of bin in Heatmap (hexbin)? -


matplotlib: how can set size of bins created using hexbin? problem have bins small graphic looks somehow weird.

using pylab_examples example code: hexbin_demo.py, can play around of optional arguments see how affect same dataset. here gridsize does:

enter image description here


i copy , pasted code demo (including data creation part) made subplots different values same parameter this

plt.subplots_adjust(hspace=0.5) plt.subplot(132) plt.hexbin(x, y, cmap=plt.cm.ylorrd_r) plt.axis([xmin, xmax, ymin, ymax]) plt.title("gridsize 100 (default)") cb = plt.colorbar() cb.set_label('counts')  plt.subplot(133) plt.hexbin(x, y, cmap=plt.cm.ylorrd_r, gridsize = 200) plt.axis([xmin, xmax, ymin, ymax]) plt.title("gridsize 200") cb = plt.colorbar() cb.set_label('counts')  plt.subplot(131) plt.hexbin(x, y, cmap=plt.cm.ylorrd_r, gridsize = 10) plt.axis([xmin, xmax, ymin, ymax]) plt.title("gridsize 10") cb = plt.colorbar() cb.set_label('counts')  plt.show() plt.close() 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -