Skip to content

Fixing typos and links #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 10, 2018
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
4 changes: 2 additions & 2 deletions AnatomyOfMatplotlib-Part1-Figures_Subplots_and_layouts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"[Matplotlib](https://github.com/matplotlib) is hosted by GitHub.\n",
"\n",
"### Bug Reports and feature requests\n",
"So, you think you found a bug? Or maybe you think some feature is just too difficult to use? Or missing altogether? Submit your bug reports [here](https://github.com/matplotlib/matplotlib/issues) at Matplotlib's issue tracker. We even have a process for submitting and discussing Matplotlib Enhancement Proposals ([MEPs](http://matplotlib.org/devdocs/devel/MEP/index.html))."
"So, you think you found a bug? Or maybe you think some feature is just too difficult to use? Or missing altogether? Submit your bug reports [here](https://github.com/matplotlib/matplotlib/issues) at Matplotlib's issue tracker. We even have a process for submitting and discussing Matplotlib Enhancement Proposals ([MEPs](https://matplotlib.org/devel/MEP/index.html))."
]
},
{
Expand Down Expand Up @@ -200,7 +200,7 @@
"\n",
"However, while we're on the topic, you can control the size of the figure through the ``figsize`` argument, which expects a tuple of ``(width, height)`` in inches. \n",
"\n",
"A really useful utility function is [`figaspect`](http://matplotlib.org/api/figure_api.html?highlight=figaspect#matplotlib.figure.figaspect)"
"A really useful utility function is [`figaspect`](https://matplotlib.org/api/_as_gen/matplotlib.figure.figaspect.html?highlight=figaspect#matplotlib.figure.figaspect)"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions AnatomyOfMatplotlib-Part3-HowToSpeakMPL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"- k: black\n",
"- w: white\n",
"\n",
"Other colornames that are allowed are the HTML/CSS colornames such as \"burlywood\" and \"chartreuse\". See the [full list](http://www.w3schools.com/html/html_colornames.asp) of the 147 colornames. \n",
"Other colornames that are allowed are the HTML/CSS colornames such as \"burlywood\" and \"chartreuse\". See the [full list](https://www.w3schools.com/Colors/colors_names.asp) of the 140 color names. \n",
"\n",
"Matplotlib supports the [xkcd color names](https://xkcd.com/color/rgb/) prefxed by `'xkcd:'`.\n",
"\n",
Expand Down Expand Up @@ -112,7 +112,7 @@
"1 | tickright ||5 | caretright ||\">\" | triangle_right||\"4\" | tri_right\n",
"2 | tickup ||6 | caretup ||\"^\" | triangle_up ||\"2\" | tri_up\n",
"3 | tickdown ||7 | caretdown ||\"v\" | triangle_down ||\"1\" | tri_down\n",
"\"None\" | nothing ||`None` | nothing ||\" \" | nothing ||\"\" | nothing"
"\"None\" | nothing ||`None` | default ||\" \" | nothing ||\"\" | nothing"
]
},
{
Expand All @@ -128,7 +128,7 @@
" \"octagon\", \"square\", \"pentagon\", \"star\", \"vertical bar\", \"horizontal bar\", \"hexagon 1\", \"hexagon 2\",\n",
" \"tick left\", \"caret left\", \"triangle left\", \"tri left\", \"tick right\", \"caret right\", \"triangle right\", \"tri right\",\n",
" \"tick up\", \"caret up\", \"triangle up\", \"tri up\", \"tick down\", \"caret down\", \"triangle down\", \"tri down\",\n",
" \"Nothing\", \"Nothing\", \"Nothing\", \"Nothing\"]\n",
" \"Nothing\", \"default\", \"Nothing\", \"Nothing\"]\n",
"fig, ax = plt.subplots(1, 1, figsize=(7.5, 4))\n",
"for x, y, m, d in zip(xs.T.flat, ys.T.flat, markers, descripts):\n",
" ax.scatter(x, y, marker=m, s=100)\n",
Expand Down
12 changes: 5 additions & 7 deletions AnatomyOfMatplotlib-Part4-Limits_Legends_and_Layouts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
"* A Tick Label is the text that is displayed at that tick.\n",
"* A [`Ticker`](http://matplotlib.org/api/ticker_api.html#module-matplotlib.ticker) automatically determines the ticks for an Axis and formats the tick labels.\n",
"\n",
"[`tick_params()`](http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.tick_params) is often used to help configure your tickers."
"[`tick_params()`](https://matplotlib.org/api/axes_api.html#ticks-and-tick-labels) is often used to help configure your tickers."
]
},
{
Expand All @@ -315,9 +315,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"A commonly-asked question is \"How do I plot non-numerical categories?\"\n",
" \n",
"Currently, the easiest way to do this is to \"fake\" the x-values and then change the tick labels to reflect the category.\n",
"A commonly-asked question is \"How do I plot categories?\"\n",
"\n",
"Starting in version 2.0 of mpl, just like any other data.\n",
"\n",
"For example:"
]
Expand All @@ -334,9 +334,7 @@
"fruit, value = zip(*data)\n",
"\n",
"fig, ax = plt.subplots()\n",
"x = np.arange(len(fruit))\n",
"ax.bar(x, value, align='center', color='gray')\n",
"ax.set(xticks=x, xticklabels=fruit)\n",
"ax.bar(fruit, value, align='center', color='gray')\n",
"plt.show()"
]
},
Expand Down
4 changes: 2 additions & 2 deletions AnatomyOfMatplotlib-Part5-Artists.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To see what properties are set for an artist, use [`getp()`](http://matplotlib.org/api/artist_api.html#matplotlib.artist.getp)"
"To see what properties are set for an artist, use [`getp()`](https://matplotlib.org/api/artist_api.html#functions)"
]
},
{
Expand All @@ -182,7 +182,7 @@
"metadata": {},
"source": [
"# Collections\n",
"In addition to the Figure and Axes containers, there is another special type of container called a [`Collection`](http://matplotlib.org/api/collections_api.html). A Collection usually contains a list of primitives of the same kind that should all be treated similiarly. For example, a [`CircleCollection`](http://matplotlib.org/api/collections_api.html#matplotlib.collections.CircleCollection) would have a list of [`Circle`](http://matplotlib.org/api/artist_api.html#matplotlib.patches.Circle) objects all with the same color, size, and edge width. Individual property values for artists in the collection can also be set (in some cases)."
"In addition to the Figure and Axes containers, there is another special type of container called a [`Collection`](http://matplotlib.org/api/collections_api.html). A Collection usually contains a list of primitives of the same kind that should all be treated similiarly. For example, a [`CircleCollection`](http://matplotlib.org/api/collections_api.html#matplotlib.collections.CircleCollection) would have a list of [`Circle`](https://matplotlib.org/api/_as_gen/matplotlib.patches.Circle.html) objects all with the same color, size, and edge width. Individual property values for artists in the collection can also be set (in some cases)."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion solutions/5.1-goldstar.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

fig, ax = plt.subplots(1, 1)

offsets = zip([0.2, 0.4, 0.6, 0.8], [0.5] * 4)
offsets = list(zip([0.2, 0.4, 0.6, 0.8], [0.5] * 4))
collection = StarPolygonCollection(5,
offsets=offsets,
transOffset=ax.transData,
Expand Down