Skip to content

Commit eb4701f

Browse files
authored
constrain xticks in two plt figures (#658)
Since we only have data points at x=4, 6, 8, 10, and 12, it is better to get rid of the odd numbered ticks to avoid confusion.
1 parent be3e610 commit eb4701f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/tutorials/barren_plateaus.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@
354354
"plt.semilogy(n_qubits, theta_var)\n",
355355
"plt.title('Gradient Variance in QNNs')\n",
356356
"plt.xlabel('n_qubits')\n",
357+
"plt.xticks(n_qubits)\n",
357358
"plt.ylabel('$\\\\partial \\\\theta$ variance')\n",
358359
"plt.show()"
359360
]
@@ -482,6 +483,7 @@
482483
"plt.semilogy(n_qubits, heuristic_theta_var)\n",
483484
"plt.title('Heuristic vs. Random')\n",
484485
"plt.xlabel('n_qubits')\n",
486+
"plt.xticks(n_qubits)\n",
485487
"plt.ylabel('$\\\\partial \\\\theta$ variance')\n",
486488
"plt.show()"
487489
]

0 commit comments

Comments
 (0)