fix: removing x axis ticks
This commit is contained in:
parent
57b8f8f353
commit
c611b59448
1 changed files with 8 additions and 8 deletions
|
|
@ -80,7 +80,7 @@
|
||||||
"# minimalistic x axis without precise ticks\n",
|
"# minimalistic x axis without precise ticks\n",
|
||||||
"plt.xticks(np.arange(1900, 2023, 10))\n",
|
"plt.xticks(np.arange(1900, 2023, 10))\n",
|
||||||
"ax.get_yaxis().set_ticks([])\n",
|
"ax.get_yaxis().set_ticks([])\n",
|
||||||
"ax.tick_params(length=4, color=\"dimgrey\")\n",
|
"ax.tick_params(length=4, color=\"white\")\n",
|
||||||
"#plt.xticks(ha='left')\n",
|
"#plt.xticks(ha='left')\n",
|
||||||
"#ax.tick_params(labelrotation=-35)\n",
|
"#ax.tick_params(labelrotation=-35)\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -157,9 +157,9 @@
|
||||||
"# Raw numbers need a Y axis scale and lines\n",
|
"# Raw numbers need a Y axis scale and lines\n",
|
||||||
"plt.xticks(np.arange(1900, 2021, 10))\n",
|
"plt.xticks(np.arange(1900, 2021, 10))\n",
|
||||||
"plt.yticks(np.arange(1000, 6000, 1000))\n",
|
"plt.yticks(np.arange(1000, 6000, 1000))\n",
|
||||||
"ax.tick_params(length=4, color=\"dimgrey\")\n",
|
"ax.tick_params(length=4, color=\"white\")\n",
|
||||||
"#plt.xticks(ha='left')\n",
|
"#plt.xticks(ha='left')\n",
|
||||||
"ax.grid(axis=\"y\", color=\"dimgrey\")\n",
|
"ax.grid(axis=\"y\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# no border, clean layout, no non-sense\n",
|
"# no border, clean layout, no non-sense\n",
|
||||||
"ax.spines['top'].set_visible(False)\n",
|
"ax.spines['top'].set_visible(False)\n",
|
||||||
|
|
@ -230,9 +230,9 @@
|
||||||
"# Raw numbers need a Y axis scale and lines\n",
|
"# Raw numbers need a Y axis scale and lines\n",
|
||||||
"plt.xticks(np.arange(1940, 2023, 10))\n",
|
"plt.xticks(np.arange(1940, 2023, 10))\n",
|
||||||
"plt.yticks(np.arange(1000, 7000, 1000))\n",
|
"plt.yticks(np.arange(1000, 7000, 1000))\n",
|
||||||
"ax.tick_params(length=4, color=\"dimgrey\")\n",
|
"ax.tick_params(length=4, color=\"white\")\n",
|
||||||
"#plt.xticks(ha='left')\n",
|
"#plt.xticks(ha='left')\n",
|
||||||
"ax.grid(axis=\"y\", color=\"dimgrey\")\n",
|
"ax.grid(axis=\"y\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# same minimalist look\n",
|
"# same minimalist look\n",
|
||||||
"ax.spines['top'].set_visible(False)\n",
|
"ax.spines['top'].set_visible(False)\n",
|
||||||
|
|
@ -327,7 +327,7 @@
|
||||||
"ax.get_xaxis().set_ticks([1800, 1850, 1900, 1950, 1995])\n",
|
"ax.get_xaxis().set_ticks([1800, 1850, 1900, 1950, 1995])\n",
|
||||||
"x_labels = [\"1800\", \"1850\", \"1900\", \"1950\", \"2000\"]\n",
|
"x_labels = [\"1800\", \"1850\", \"1900\", \"1950\", \"2000\"]\n",
|
||||||
"ax.set_xticklabels(x_labels)\n",
|
"ax.set_xticklabels(x_labels)\n",
|
||||||
"ax.tick_params(length=4, color=\"dimgrey\")\n",
|
"ax.tick_params(length=4, color=\"white\")\n",
|
||||||
"#plt.xticks(ha='left')\n",
|
"#plt.xticks(ha='left')\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# same clean look\n",
|
"# same clean look\n",
|
||||||
|
|
@ -435,7 +435,7 @@
|
||||||
"ticks_array = np.concatenate((start, middle, end), axis=0)\n",
|
"ticks_array = np.concatenate((start, middle, end), axis=0)\n",
|
||||||
"plt.xticks(ticks_array)\n",
|
"plt.xticks(ticks_array)\n",
|
||||||
"ax.get_yaxis().set_ticks([])\n",
|
"ax.get_yaxis().set_ticks([])\n",
|
||||||
"ax.tick_params(length=4, color=\"dimgrey\")\n",
|
"ax.tick_params(length=4, color=\"white\")\n",
|
||||||
"#ax.tick_params(rotation=35)\n",
|
"#ax.tick_params(rotation=35)\n",
|
||||||
"#plt.xticks(ha='left')\n",
|
"#plt.xticks(ha='left')\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -478,7 +478,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"__Note 2025-11-05__\n",
|
"__Note 2025-11-05__\n",
|
||||||
"\n",
|
"\n",
|
||||||
"The \"ha\" alignment to the right that contained the x-axis years into the frame of the plots has been commented out because it conflicted with an argument made in the text about coal starting in 1890, and a plot showing coal starting around 1860. Also adding dimgrey ticks."
|
"The \"ha\" alignment to the right that contained the x-axis years into the frame of the plots has been commented out because it conflicted with an argument made in the text about coal starting in 1890, and a plot showing coal starting around 1860."
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue