Created
September 27, 2014 20:37
-
-
Save ibanezmatt13/80732e22a22d48ca5818 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# simple plotter for particles speed distribution example | |
import matplotlib.pyplot as plt | |
import numpy as np | |
fob = open("Boltzmann.txt", "r") | |
v_freq_string = fob.read() | |
fob.close() | |
v_freq = [] | |
v_freq_split = v_freq_string.split(",") | |
counter = 0 | |
for counter in range(0, len(v_freq_split)-1): | |
v_freq.append(v_freq_split[counter]) | |
counter += 1 | |
x = np.array(v_freq, dtype='|S4') | |
y = x.astype(np.float) | |
print len(y) | |
plt.plot(np.arange(0,105), v_freq) | |
plt.show() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment