Plotting a 3d surface in Python from known values
use x and y as coordinates and put a dot sized for the energy z.
a table would work as well, since you haven't stated that x and y geometries have any numeric purpose other than as lablels.
I have a set of about 2000 files that look like: 10_20.txt, 10_21.txt, 10_21.txt, ... ,10_50.txt, ... , 11.20.txt, ... , 11.50.txt , ... , 20_50.txt
The first value in the file name, we'll call x, goes from 10-20 in steps of 1, and the second value in the file name, we'll call y, and goes from 20-50 in steps of 1.
Within these files, there is a load of values and another value I want to extract, which we'll call z.
I have written a program to cycle through the files and extract z from each file and add it to a list.
My question now is, if I have 2 numpy arrays that look like:
x = np.arange(10,20,1)
 y = np.arange(20,50,1)
and a z list that has ~2000 floats in it, what is the best way to plot how z depends on x and y? Is there standard way to do this?
I had been thinking it would be best to extract x, y and z from a file, and add them to a multidimensional array. If this is the case could anyone point me in the right direction of how to extract the x and y values out of the file name.