0

I'd like to make a simple 2d plot (like with imshow or contour) for some scalar data z which is dependend on two scalar input variables x and y (so z = f(x,y)).

However, I do not know the analytical function of the dependencies, I rather have all the data in three columns x,y and z in a pandas dataframe like:

import pandas as pd

d = {'x': [1, 1, 1, 2, 2, 2], 
     'y': [1, 2, 3, 1, 2, 3], 
     'z': [30, 31, 33, 10, 8, 6]}
df = pd.DataFrame(data=d)

This should be fairly easy, however I have not found a solution yet. Help much appreciated! Thanks

I tried to play around with meshgrid and contour, but I do not know how to reshape my z data accordingly.

TeddyD
  • 1

0 Answers0