python - Drawing rectangular grid using matplotlib -


is there easy way in python using pyplot (matplotlib) create rectangular grid (like this, perhaps gridded) this: enter image description here

i pretty new python, , there may simple solution this, have been unable find it.

thanks in advance.

it's not clear details you're going here's start...

enter image description here

import matplotlib.pyplot plt  ax = plt.subplot(1, 1, 1) ax.spines['left'].set_position('zero') ax.spines['right'].set_color('none') ax.spines['bottom'].set_position('zero') ax.spines['top'].set_color('none') ax.spines['left'].set_smart_bounds(true) ax.spines['bottom'].set_smart_bounds(true) ax.xaxis.set_ticks_position('bottom') ax.yaxis.set_ticks_position('left') ax.set_xticks(range(-5, 6)) ax.set_yticks(range(-5, 6)) ax.set_xlim((-5.5, 5.5)) ax.set_ylim((-5.5, 5.5)) ax.grid()  plt.show() 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -