I have a matrix A(20374, 1).
I would like to draw histogram(DVH) using this data.

My code is as below.

```
edge_A = np.linespace(0, max(A), 1000)
x_A = np.linespace(0.5*max(A)/1000, max(A), 1000)
n_A = np.histogram(A, bins=edge_A)
y_A = 1 - np.cumsum(n_A / len(A), axis=0)
plt.figure()
plt.plot(x_A, y_A)
plt.show()

```

But, this code is not work in line of y\_A because n\_A is tuple and len(A) is int, so this cannot be calculated.
Also, I think the line of n\_A is not right.

How can I solve this problem.

I'm attaching the matlab code in this part which runs well.

```
edge_A = 0:max(A)/1000:max(A);
x_A = 0.5*max(A)/1000:max(A)/1000:max(A);
n_A = hiscounts(A, edge_A)
y_A = 1 - cumsum(n_A/length(A));
plot(x_A, y_A);

```