I have a database of the height, weight, and age of 100s of people. Using matplotlib, I've been able to create a 3D scatterplot of these 3 variables with the xyz co-ordinates of each point representing the (height,weight,age) of one person.
Is it possible to create a (i) line (ii) surface of best fit for the data? The meshgrid would be incomplete since I don't have an age (z) value for each pairing of height and weight (x,y) values. Can we draw the line/surface regardless? Do I have to impute the missing z-values in the meshgrid, and if so, how would I do that?
Most other answers I've seen on this topic assume z is a function of x and y, or that the meshgrid is complete, both of which are not the case here.