Skip to content

Commit

Permalink
constrain xticks in two plt figures (#658)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
qu-tan-um authored Jan 29, 2022
1 parent be3e610 commit eb4701f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/tutorials/barren_plateaus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@
"plt.semilogy(n_qubits, theta_var)\n",
"plt.title('Gradient Variance in QNNs')\n",
"plt.xlabel('n_qubits')\n",
"plt.xticks(n_qubits)\n",
"plt.ylabel('$\\\\partial \\\\theta$ variance')\n",
"plt.show()"
]
Expand Down Expand Up @@ -482,6 +483,7 @@
"plt.semilogy(n_qubits, heuristic_theta_var)\n",
"plt.title('Heuristic vs. Random')\n",
"plt.xlabel('n_qubits')\n",
"plt.xticks(n_qubits)\n",
"plt.ylabel('$\\\\partial \\\\theta$ variance')\n",
"plt.show()"
]
Expand Down

0 comments on commit eb4701f

Please sign in to comment.