title: How can I select get the particular area, from an array, diagonally or other than horizontally?
body: <p>I have a 4d dataarray of shape time,z,y,x = 96,40,500,500, as shown in Figure <a href="https://i.stack.imgur.com/R78Kk.png" rel="nofollow noreferrer">1</a>, where time = 3 and z = 4. Now I want to select the highlighted part, how can I do that?
  I can slice it horizontally, but how to do so diagonally or other than horizontally?</p>
  <p>I tried<br />
  <code>plt.figure(figsize=[10,8],dpi=100)</code>
  <code>tkt16l['REF'][3,5].plot.contourf(cmap='gray_r', levels=np.linspace(25,60,5), xlim=[-200000,150000],ylim=[-200000,200000])</code></p>
  <p>But it cannot be used to do so.</p>
  <p><a href="https://i.stack.imgur.com/R78Kk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R78Kk.png" alt="Figure" /></a></p>