Repository: Qiskit/qiskit

Issue:
`plot_state_hinton` doesn't plot all real matrix components
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->

### Information

- **Qiskit Terra version**: 0.13
- **Python version**: 3.7
- **Operating system**: MacOS

### What is the current behavior?

`plot_state_hinton` isn't plotting all matrix components for computational basis states.

### Steps to reproduce the problem

Plot a computational basis state on any number of qubits

```python
from qiskit.quantum_info import DensityMatrix
from qiskit.visualization import *

rho = DensityMatrix.from_label('11').data
plot_state_hinton(rho)
```
returns

![hinton_broken](https://user-images.githubusercontent.com/2235104/80237594-faa3ab00-862a-11ea-8d83-a6da321a4e91.png)

### What is the expected behavior?

It should look like the hinton version of hte city plot, but there are not enough ticks or entrys on the real part of the plot. It is only plotting the one non-zero component.

![city_working](https://user-images.githubusercontent.com/2235104/80237612-055e4000-862b-11ea-9326-e65db3f26706.png)

### Suggested solutions





Discussion:
I have fix for this in my old PR (not reviewed for long time)
https://github.com/Qiskit/qiskit-terra/pull/3375

Resolving patch:
diff --git a/qiskit/visualization/state_visualization.py b/qiskit/visualization/state_visualization.py
--- a/qiskit/visualization/state_visualization.py
+++ b/qiskit/visualization/state_visualization.py
@@ -140,17 +140,16 @@ def plot_state_hinton(state, title='', figsize=None, ax_real=None, ax_imag=None,
         for (x, y), w in np.ndenumerate(datareal):
             color = 'white' if w > 0 else 'black'
             size = np.sqrt(np.abs(w) / max_weight)
-            rect = plt.Rectangle([x - size / 2, y - size / 2], size, size,
+            rect = plt.Rectangle([0.5 + x - size / 2, 0.5 + y - size / 2], size, size,
                                  facecolor=color, edgecolor=color)
             ax1.add_patch(rect)
 
-        ax1.set_xticks(np.arange(0, lx+0.5, 1))
-        ax1.set_yticks(np.arange(0, ly+0.5, 1))
-        row_names.append('')
+        ax1.set_xticks(0.5 + np.arange(lx))
+        ax1.set_yticks(0.5 + np.arange(ly))
+        ax1.set_xlim([0, lx])
+        ax1.set_ylim([ly, 0])
         ax1.set_yticklabels(row_names, fontsize=14)
-        column_names.append('')
         ax1.set_xticklabels(column_names, fontsize=14, rotation=90)
-        ax1.autoscale_view()
         ax1.invert_yaxis()
         ax1.set_title('Re[$\\rho$]', fontsize=14)
     # Imaginary
@@ -163,16 +162,16 @@ def plot_state_hinton(state, title='', figsize=None, ax_real=None, ax_imag=None,
         for (x, y), w in np.ndenumerate(dataimag):
             color = 'white' if w > 0 else 'black'
             size = np.sqrt(np.abs(w) / max_weight)
-            rect = plt.Rectangle([x - size / 2, y - size / 2], size, size,
+            rect = plt.Rectangle([0.5 + x - size / 2, 0.5 + y - size / 2], size, size,
                                  facecolor=color, edgecolor=color)
             ax2.add_patch(rect)
 
-        ax2.set_xticks(np.arange(0, lx+0.5, 1))
-        ax2.set_yticks(np.arange(0, ly+0.5, 1))
+        ax2.set_xticks(0.5 + np.arange(lx))
+        ax2.set_yticks(0.5 + np.arange(ly))
+        ax1.set_xlim([0, lx])
+        ax1.set_ylim([ly, 0])
         ax2.set_yticklabels(row_names, fontsize=14)
         ax2.set_xticklabels(column_names, fontsize=14, rotation=90)
-
-        ax2.autoscale_view()
         ax2.invert_yaxis()
         ax2.set_title('Im[$\\rho$]', fontsize=14)
     if title:


Test patch: