1

I'm trying to use matplotlib to visualise the continuous output of a function which takes 3 integers as arguments. I've iterated through each point in a 3d grid of inputs (like grid search in scikit-learn) with 1, 2 and 3 on each axis, calculating the function output for each combination, i.e. I calculate f(1,1,1), f(1,1,2), f(1,1,3), f(1,2,1) and so on.

My question is, what is the best way to plot this output? I thought that, given the small range of each input (the range is 1-7, not 1-3, in my actual data), I could plot an ordinal series of heatmaps as planes in 3d, like so:

enter image description here

Is this possible with matplotlib?

Suggestions re. nicer ways to do the visualisation would also be welcome. This answer plots a 'heatcube' but, as the answerer points out, it's tricky to read.

Community
  • 1
  • 1
user1684046
  • 1,739
  • 2
  • 13
  • 15
  • 1
    It is possible. A plot similar to the one shown in the image could be produced by plotting 3 flat surface plots (`plot_surface()`), which have an offset of some units to each other. What do you expect from an answer to this question? Should it simply say "Yes, we can!"? – ImportanceOfBeingErnest Apr 07 '17 at 21:53

0 Answers0