Friday, January 29, 2016

Plot XYZ as Points Python

#!/usr/bin/python
import numpy as np
import matplotlib.pyplot as plt
data = np.genfromtxt('input2d.txt')
x = data[:,0]
y = data[:,1]
z = data[:,2]

plt.scatter(x, y, c = z, lw = 0)
plt.clim(vmin=-1200,vmax=-200) #color limit
plt.colorbar()
plt.show()

No comments: