matplotlib と scipy を使用してデータの散布図を作成する最初の試みで問題が発生しています (変数が多すぎて、一度に多くのものを見ようとしています)。これはかなりうまく機能している私のコードです...
import numpy
from scipy import *
import pylab
from matplotlib import *
import h5py
FileID = h5py.File('3DiPVDplot1.mat','r')
# (to view the contents of: list(FileID) )
group = FileID['/']
CurrentsArray = group['Currents'].value
IvIIIarray = group['IvIII'].value
PFarray = group['PF'].value
growthTarray = group['growthT'].value
fig = pylab.figure()
ax = fig.add_subplot(111)
cax = ax.scatter(IvIIIarray, growthTarray, PFarray, CurrentsArray, alpha=0.75)
cbar = fig.colorbar(cax)
ax.set_xlabel('Cu / III')
ax.set_ylabel('Growth T')
ax.grid(True)
pylab.show()
コードを変更してラテックス フォントと解釈を含めようとしましたが、どれもうまくいかないようです。うまくいかなかった試みの例を次に示します。
import numpy
from scipy import *
import pylab
from matplotlib import *
import h5py
rc('text', usetex=True)
rc('font', family='serif')
FileID = h5py.File('3DiPVDplot1.mat','r')
# (to view the contents of: list(FileID) )
group = FileID['/']
CurrentsArray = group['Currents'].value
IvIIIarray = group['IvIII'].value
PFarray = group['PF'].value
growthTarray = group['growthT'].value
fig = pylab.figure()
ax = fig.add_subplot(111)
cax = ax.scatter(IvIIIarray, growthTarray, PFarray, CurrentsArray, alpha=0.75)
cbar = fig.colorbar(cax)
ax.set_xlabel(r'Cu / III')
ax.set_ylabel(r'Growth T')
ax.grid(True)
pylab.show()
私は、scipy matplotlib などに対応するパッケージとともに、fink をインストールした python26 を使用しています。Python のスクリプトの代わりに、iPython と手作業を使用しています。
私は python と scipy にまったく慣れていないので、ばかげた単純な間違いを犯していると確信しています。教えてください!大変助かりました!