Skip to content

Instantly share code, notes, and snippets.

@jalada
Created January 25, 2010 17:53
Show Gist options
  • Save jalada/286066 to your computer and use it in GitHub Desktop.
Save jalada/286066 to your computer and use it in GitHub Desktop.
# Gnuplot is quicker than provided display_probs.py:
# gnuplot> set view map
# gnuplot> splot 'filename' matrix with image
def tognuplot(filename, matrix):
f = open(filename, 'w')
for i in xrange(len(matrix)):
f.write(' '.join([ str(x) for x in matrix[i]]) + '\n')
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment