Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion core/matplotlib/additional-topics2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@
"id": "60564465-4b40-467b-a1a5-d10c4378329c",
"metadata": {},
"source": [
"## Colormap Overview"
"## Colormap Overview\n",
"\n",
"Colormaps are a visually appealing way to represent another dimension to your data. They are a matrix of hues and values allowing you to, for example, display hotter temperatures as red and colder temperatures as blue."
]
},
{
Expand Down Expand Up @@ -360,6 +362,12 @@
"</details>"
]
},
{
"cell_type": "markdown",
"id": "e1bff589",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"id": "5ce3b4c7-1186-4067-9b34-552382bf614e",
Expand Down
20 changes: 17 additions & 3 deletions core/matplotlib/matplotlib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"## Overview\n",
"We will cover the basics of plotting within Python, using the Matplotlib library, including a few different plots available within the library.\n",
"\n",
"1. Why Matplotlib?\n",
"1. Figure and axes\n",
"1. Basic line plots\n",
"1. Labels and grid lines\n",
Expand Down Expand Up @@ -54,6 +55,19 @@
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Why Matplotlib?\n",
"\n",
"Matplotlib is a plotting library for Python and is often the first plotting package Python-learners encounter. You may be wondering, \"Why learn Matplotlib? Why not Seaborn or another plotting library first?\"\n",
"\n",
"The simple answer is because of Matplotlib's popularity. Matplotlib is one of the most popular Python packages. Because of its history as Python's \"go-to\" plotting package, most other open source plotting libraries (including Seaborn) are built on top of Matplotlib and thus these improved or specialized plotting packages still inherit some of Matplotlib's capabilities, syntax, and limitations. You will find it useful to be familiar with Matplotlib when learning other plotting libraries.\n",
"\n",
"Matplotlib supports a variety of output formats, chart types, and interactive options, and runs well on most operating systems and graphic backends. These features are part of \"Why Matplotlib\" is so popular, and the first plotting language we will introduce you to in this book."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -213,7 +227,7 @@
"ax.plot(times, temps);"
]
},
{
{
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -629,7 +643,7 @@
"ax2.grid(True)\n",
"ax2.legend(loc='upper left')\n",
"ax2.set_ylim(257, 312)\n",
"ax2.set_xlim(95, 162)"
"ax2.set_xlim(95, 162);"
]
},
{
Expand Down Expand Up @@ -839,7 +853,7 @@
" Z, interpolation='bilinear', cmap='PiYG', origin='lower', extent=[-3, 3, -3, 3]\n",
")\n",
"c = ax.contour(X, Y, Z, levels=np.arange(-2, 2, 0.5), colors='black')\n",
"ax.clabel(c)"
"ax.clabel(c);"
]
},
{
Expand Down