1

I have an array A with size (7704,3) each row of this array is a sample. the first column is a PSNR value, the second column is resolution and the last column is bitrate. for a specific resolution and bitrate, we have a PSNR value. now I want to plot these data in a diagram. for this I used the following code:

plt.plot(a[:,0],a[:,1],a[:2])

but the output is as this diagram. enter image description here

I need a 3d diagram like this, that one axis is for resolution, one for PSNR, and one for bitrate. but I am not familiar with matplot and I do not know how can I do this. could you please how can I plot this 3d plot? some part of the data is as follows:

25.8072 720 1
28.4523 720 1
28.4938 720 1
26.7958 720 1

enter image description here

david
  • 1,255
  • 4
  • 13
  • 26
  • Does `plt.plot(a[:, : ,0], a[:, :, 1], a[:, :, 2])` help? – MSH Nov 30 '21 at 11:58
  • 1
    my array is A=(7704,3) and running your code makes this error:IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed – david Nov 30 '21 at 12:10

0 Answers0