0

I have an array A with a shape of (75,552,552), where values are a function of (depth, longitude, latitude) (z,x,y) respectively.

and :

x = np.arange(-7.03125,27.28125,0.0622).

y = np.arange(-44.89006,-15.7057495,0.0529).

z = np.linspace(-0.511953294, -5902.05762,75)

A = np.random.rand(75,552,552)

I want to create a plot like pcolormesh or pcolor but in 4D (depth, lon, lat + Value) to look like the attached one.

enter image description here

Amr Talaat
  • 81
  • 2
  • 10
  • 1
    Does this answer your question? [(python) plot 3d surface with colormap as 4th dimension, function of x,y,z](https://stackoverflow.com/questions/32461452/python-plot-3d-surface-with-colormap-as-4th-dimension-function-of-x-y-z) – ILS Nov 29 '22 at 12:17
  • Unfortunately no ! since my z is 1D, but in the mentioned link is 2D. – Amr Talaat Nov 29 '22 at 12:37
  • In the accepted answer linked by @ILS , z also starts as 1D... – fdireito Nov 29 '22 at 13:28
  • Yes, but it is different than my arrays. Since, my Z represent only depth values, and my array A is 3D while in the mentioned link is only 2D. – Amr Talaat Nov 29 '22 at 14:15
  • You can use a scatter plot, with a downsampled data set, where the marker color represents the value of the indipendent variable. Or you can use VTK or Mayavi. – gboffi Nov 29 '22 at 15:48

0 Answers0