-1
plot of electric fieldplot of electron phase space distributionPythonの:私は、Pythonに新しいです
軸の長さを変え、私は付属のプロットを生成するには、このスクリプトを持って、
fig = plt.figure(figsize=(9,3.0))
ax = fig.add_subplot(111)
mul = 1e-2 * m0 * c * wpe/q0
im = ax.pcolormesh(X,Y,dat.Electric_Field_Ex.data[sx,sy]/mul)
plt.yticks(np.arange(np.min(Y), np.max(Y)+1, 2.0))
plt.xlabel("X-Position")
plt.ylabel("Y-Position")
divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.2)
cbar = plt.colorbar(im, cax=cax)
cbar.set_ticks(np.arange(-1, 4, 1))
ax.set_xlim([-x0,x0])
[enter image description here][1]plt.savefig('ex.png',dpi=300,bbox_inches='tight')
私は長く、例えばx軸を作りたいです-5から5まで?これはどうすればいいですか?
任意の助けをいただければ幸いです...おかげ
感謝!私はそれを試してみます –
それは感謝を働いた、私はそれを見ていたので、私はobvisousを見ることができませんでした!ありがとう –
これはあなたのために働いた場合は、[解決を受け入れる](http://stackoverflow.com/help/accepted-answer)する必要があります。 – Scimonster