title: How to plot the 4-D data outputted from scipy.brute() method?
body: <p>I am trying to optimize a certain equation that has 3 different variables. Since, I needed the global minimum I am using the scipy.brute() method to find the minimum.</p>
  
  <p>What I now need to do is take the output from that, and create a 4-D graph (probably using color) of all the possible solutions.</p>
  
  <p>The problem is I can't use the regular scatter plots because I have a data point at every integer point.</p>
  
  <p>Also color plot which is my chosen form of graphing, only works on 3-D data.</p>
  
  <pre class="lang-py prettyprint-override"><code>def objFunc(x):
      return x[0] + x[1] + x[2] #not actual objective
  
  def optim():
      range = (slice(5, 40, 1),) * 3
      result = brute(objFunc, range, full_output=True, finish=None)
      return result
  </code></pre>
  
  <p>The output looks like this: </p>
  
  <pre><code>(array([16., 11., 17.]),
   -14.264000000000266,
   array([[[[ 5,  5,  5, ...,  5,  5,  5],
            [ 5,  5,  5, ...,  5,  5,  5],
            [ 5,  5,  5, ...,  5,  5,  5],
            ...,
            [ 5,  5,  5, ...,  5,  5,  5],
            [ 5,  5,  5, ...,  5,  5,  5],
            [ 5,  5,  5, ...,  5,  5,  5]],
  
           [[ 6,  6,  6, ...,  6,  6,  6],
            [ 6,  6,  6, ...,  6,  6,  6],
            [ 6,  6,  6, ...,  6,  6,  6],
            ...,
            [ 6,  6,  6, ...,  6,  6,  6],
            [ 6,  6,  6, ...,  6,  6,  6],
            [ 6,  6,  6, ...,  6,  6,  6]],
  
           [[ 7,  7,  7, ...,  7,  7,  7],
            [ 7,  7,  7, ...,  7,  7,  7],
            [ 7,  7,  7, ...,  7,  7,  7],
            ...,
            [ 7,  7,  7, ...,  7,  7,  7],
            [ 7,  7,  7, ...,  7,  7,  7],
            [ 7,  7,  7, ...,  7,  7,  7]],
  
           ...,
  
           [[37, 37, 37, ..., 37, 37, 37],
            [37, 37, 37, ..., 37, 37, 37],
            [37, 37, 37, ..., 37, 37, 37],
            ...,
            [37, 37, 37, ..., 37, 37, 37],
            [37, 37, 37, ..., 37, 37, 37],
            [37, 37, 37, ..., 37, 37, 37]],
  
           [[38, 38, 38, ..., 38, 38, 38],
            [38, 38, 38, ..., 38, 38, 38],
            [38, 38, 38, ..., 38, 38, 38],
            ...,
            [38, 38, 38, ..., 38, 38, 38],
            [38, 38, 38, ..., 38, 38, 38],
            [38, 38, 38, ..., 38, 38, 38]],
  
           [[39, 39, 39, ..., 39, 39, 39],
            [39, 39, 39, ..., 39, 39, 39],
            [39, 39, 39, ..., 39, 39, 39],
            ...,
            [39, 39, 39, ..., 39, 39, 39],
            [39, 39, 39, ..., 39, 39, 39],
            [39, 39, 39, ..., 39, 39, 39]]],
  
  
          [[[ 5,  5,  5, ...,  5,  5,  5],
            [ 6,  6,  6, ...,  6,  6,  6],
            [ 7,  7,  7, ...,  7,  7,  7],
            ...,
            [37, 37, 37, ..., 37, 37, 37],
            [38, 38, 38, ..., 38, 38, 38],
            [39, 39, 39, ..., 39, 39, 39]],
  
           [[ 5,  5,  5, ...,  5,  5,  5],
            [ 6,  6,  6, ...,  6,  6,  6],
            [ 7,  7,  7, ...,  7,  7,  7],
            ...,
            [37, 37, 37, ..., 37, 37, 37],
            [38, 38, 38, ..., 38, 38, 38],
            [39, 39, 39, ..., 39, 39, 39]],
  
           [[ 5,  5,  5, ...,  5,  5,  5],
            [ 6,  6,  6, ...,  6,  6,  6],
            [ 7,  7,  7, ...,  7,  7,  7],
            ...,
            [37, 37, 37, ..., 37, 37, 37],
            [38, 38, 38, ..., 38, 38, 38],
            [39, 39, 39, ..., 39, 39, 39]],
  
           ...,
  
           [[ 5,  5,  5, ...,  5,  5,  5],
            [ 6,  6,  6, ...,  6,  6,  6],
            [ 7,  7,  7, ...,  7,  7,  7],
            ...,
            [37, 37, 37, ..., 37, 37, 37],
            [38, 38, 38, ..., 38, 38, 38],
            [39, 39, 39, ..., 39, 39, 39]],
  
           [[ 5,  5,  5, ...,  5,  5,  5],
            [ 6,  6,  6, ...,  6,  6,  6],
            [ 7,  7,  7, ...,  7,  7,  7],
            ...,
            [37, 37, 37, ..., 37, 37, 37],
            [38, 38, 38, ..., 38, 38, 38],
            [39, 39, 39, ..., 39, 39, 39]],
  
           [[ 5,  5,  5, ...,  5,  5,  5],
            [ 6,  6,  6, ...,  6,  6,  6],
            [ 7,  7,  7, ...,  7,  7,  7],
            ...,
            [37, 37, 37, ..., 37, 37, 37],
            [38, 38, 38, ..., 38, 38, 38],
            [39, 39, 39, ..., 39, 39, 39]]],
  
  
          [[[ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            ...,
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39]],
  
           [[ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            ...,
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39]],
  
           [[ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            ...,
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39]],
  
           ...,
  
           [[ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            ...,
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39]],
  
           [[ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            ...,
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39]],
  
           [[ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            ...,
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39],
            [ 5,  6,  7, ..., 37, 38, 39]]]]),
   array([[[ 0.0000e+00,  0.0000e+00,  0.0000e+00, ...,  0.0000e+00,
             0.0000e+00,  0.0000e+00],
           [-1.8646e+00, -3.9202e+00, -4.0626e+00, ..., -1.2946e+00,
            -1.7752e+00, -2.1930e+00],
           [-4.3552e+00, -4.0626e+00, -4.9642e+00, ..., -1.7610e+00,
            -5.3600e-02,  2.6060e-01],
           ...,
           [-1.0168e+00,  1.2460e-01, -9.4820e-01, ...,  2.4376e+00,
             2.7144e+00,  4.7294e+00],
           [-8.7720e-01, -3.9600e-01,  7.5920e-01, ...,  2.7144e+00,
             4.6094e+00,  4.7240e+00],
           [-4.6200e-01, -8.1380e-01,  1.0734e+00, ...,  4.7294e+00,
             4.7240e+00,  4.3872e+00]],
  
          [[ 1.8646e+00,  3.9202e+00,  4.0626e+00, ...,  1.2946e+00,
             1.7752e+00,  2.1930e+00],
           [ 0.0000e+00,  0.0000e+00,  0.0000e+00, ...,  0.0000e+00,
             0.0000e+00,  0.0000e+00],
           [-3.9826e+00, -4.7238e+00, -7.4158e+00, ...,  4.3906e+00,
             2.7800e+00,  8.0380e-01],
           ...,
           [ 1.2460e-01,  1.7028e+00,  3.6512e+00, ...,  2.2730e+00,
             1.5168e+00,  9.2340e-01],
           [-3.9600e-01,  2.3934e+00,  2.4206e+00, ...,  1.5168e+00,
             9.2340e-01,  1.5756e+00],
           [-8.1380e-01,  1.5208e+00,  1.3440e-01, ...,  9.2340e-01,
             1.5756e+00,  2.8896e+00]],
  
          [[ 4.3552e+00,  4.0626e+00,  4.9642e+00, ...,  1.7610e+00,
             5.3600e-02, -2.6060e-01],
           [ 3.9826e+00,  4.7238e+00,  7.4158e+00, ..., -4.3906e+00,
            -2.7800e+00, -8.0380e-01],
           [ 0.0000e+00,  0.0000e+00,  0.0000e+00, ...,  0.0000e+00,
             0.0000e+00,  0.0000e+00],
           ...,
           [-9.4820e-01,  3.2012e+00,  2.3234e+00, ...,  1.8586e+00,
             3.1328e+00,  3.3862e+00],
           [ 7.5920e-01,  1.9706e+00,  1.8436e+00, ...,  3.0428e+00,
             3.3862e+00,  3.5442e+00],
           [ 1.0734e+00, -5.6000e-03,  4.0352e+00, ...,  3.3862e+00,
             3.5442e+00,  2.6238e+00]],
  
          ...,
  
          [[ 1.0168e+00, -1.2460e-01,  9.4820e-01, ..., -2.4376e+00,
            -2.7144e+00, -4.7294e+00],
           [-1.2460e-01, -1.7028e+00, -3.6512e+00, ..., -2.2730e+00,
            -1.5168e+00, -9.2340e-01],
           [ 9.4820e-01, -3.2012e+00, -2.3234e+00, ..., -1.8586e+00,
            -3.1328e+00, -3.3862e+00],
           ...,
           [ 0.0000e+00,  0.0000e+00,  0.0000e+00, ...,  0.0000e+00,
             0.0000e+00,  0.0000e+00],
           [ 6.6600e-01,  1.2574e+00,  1.1392e+00, ...,  5.3169e+00,
             3.6745e+00,  5.9975e+00],
           [ 2.7666e+00,  6.2400e-01,  1.4826e+00, ...,  3.7183e+00,
             5.9975e+00,  6.0069e+00]],
  
          [[ 8.7720e-01,  3.9600e-01, -7.5920e-01, ..., -2.7144e+00,
            -4.6094e+00, -4.7240e+00],
           [ 3.9600e-01, -2.3934e+00, -2.4206e+00, ..., -1.5168e+00,
            -9.2340e-01, -1.5756e+00],
           [-7.5920e-01, -1.9706e+00, -1.8436e+00, ..., -3.0428e+00,
            -3.3862e+00, -3.5442e+00],
           ...,
           [-6.6600e-01, -1.2574e+00, -1.1392e+00, ..., -5.3169e+00,
            -3.6745e+00, -5.9975e+00],
           [ 0.0000e+00,  0.0000e+00,  0.0000e+00, ...,  0.0000e+00,
             0.0000e+00,  0.0000e+00],
           [ 2.6952e+00,  7.3620e-01,  2.1606e+00, ...,  5.9975e+00,
             6.2250e+00,  6.0576e+00]],
  
          [[ 4.6200e-01,  8.1380e-01, -1.0734e+00, ..., -4.7294e+00,
            -4.7240e+00, -4.3872e+00],
           [ 8.1380e-01, -1.5208e+00, -1.3440e-01, ..., -9.2340e-01,
            -1.5756e+00, -2.8896e+00],
           [-1.0734e+00,  5.6000e-03, -4.0352e+00, ..., -3.3862e+00,
            -3.5442e+00, -2.6238e+00],
           ...,
           [-2.7666e+00, -6.2400e-01, -1.4826e+00, ..., -3.7183e+00,
            -5.9975e+00, -6.0069e+00],
           [-2.6952e+00, -7.3620e-01, -2.1606e+00, ..., -5.9975e+00,
            -6.2250e+00, -6.0576e+00],
           [ 0.0000e+00,  0.0000e+00,  0.0000e+00, ...,  0.0000e+00,
             0.0000e+00,  0.0000e+00]]]))
  </code></pre>
  
  <p>Which isn't something that I can easily graph</p>