min/max plot

main
Jeff Moe 2022-05-27 14:56:23 -06:00
parent 89d7f77f87
commit 3f5fe46b14
4 changed files with 23 additions and 22 deletions

View File

@ -61,7 +61,7 @@
"outputs": [],
"source": [
"df = pd.read_csv('examples/olympus-vanta.csv', header = 0,\n",
" skiprows=40,\n",
" skiprows=39,\n",
" names=('eV', 'Counts'),\n",
" usecols = [0, 1])\n",
"\n",
@ -85,13 +85,14 @@
"source": [
"sns.set_theme()\n",
"plt.figure(facecolor='xkcd:off white', figsize=(15, 8))\n",
"# XXX y=\n",
"g=sns.lineplot(x=\"eV\", y=\"Counts\", data=df, linestyle='-', linewidth=1, color='xkcd:pale orange')\n",
"g=sns.lineplot(x=\"eV\", y=\"Counts\", data=df, linestyle='-', linewidth=1, color='xkcd:pale orange', legend=False)\n",
"g.set_title('XRF Spectrum'.format('seaborn'), color='xkcd:cornflower blue', fontsize='large', fontweight='bold')\n",
"g.set_xlabel('energy (eV)', color='xkcd:goldenrod', fontsize='large', fontweight='bold')\n",
"g.set_ylabel('Counts', color='xkcd:cerulean', fontsize='large', fontweight='bold')\n",
"g.patch.set_alpha(1.0)\n",
"g.set_facecolor('xkcd:powder blue')\n",
"plt.xlim(0,50000)\n",
"plt.ylim(0,100000)\n",
"plt.tight_layout()\n",
"plt.savefig(\"xrf-spectrum-vanta.png\", dpi=72, transparent=False, facecolor='xkcd:off white', edgecolor=g.get_facecolor())\n",
"plt.show()\n",

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB