Similar questions have been asked in the past in this site - such as Representing 4D data in mplot 3D using colormaps or How to make a 4d plot using Python with matplotlib - but as far as I have found, none of them answers my specific problem.
I have the following data at my disposal:
x1 = numpy.logspace(-100, 20, num=13, base=2)
x2 = numpy.logspace(-100, 20, num=13, base=2)
x3 = numpy.logspace(-5, 5, num=11, base=10)
y = [...]
So that makes 2 vectors with 13 elements and one vector with 11 elements. Then y
is a 13*13*11 variable: i.e. for each combination of elements from x1
, x2
and x3
I have a corresponding value in y
.
I am wondering if there is any elegant way in Python to visualise this data; I had thought of combining 3D plots with color-mapping as in the links I have posted, however in the examples given in those posts the 3rd variable - x3
- is a function of the other 2, whereas in my case it is y
that is a function of x1
, x2
and x3
.
Would there be any way/trick to achieve this in a single graph or in as few graphs as possible?
Edit: an idea might be to plot for example 11 colormaps, where each colormap corresponds to a value of x3
. A dummy example:
How could this be achieved?