I'm plotting the effect of the interaction of two variables in two different dependent variables and want to present them both on a single plot.

I had a level plot showing the colors for one variable and lines for the second one, but I'd like the effect of the most important variable to be self evident while at the same time showing the second variable.

So I'd like to do a 3D surface plot with the height of the first variable and the color of the second variable. So far I haven't found a library that can handle this use case, most use the same variable for color and height without option to handle them separately.

An example of the required use case is shown in the picture:

A 3D surface where color does not correspond with height

Which python or R library can handle that use case?

1 Answer 1


I was just introduced to plotyly, from my brief introduction it should handle your use case well.

https://plot.ly/python/ [Intuitive plotting for Python!][1]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.