Skip to content

Commit 3f7b61e

Browse files
polish on barplot title
1 parent 1a4cac7 commit 3f7b61e

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

source/viz.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,19 +1269,10 @@ we could add a minus sign to reverse the order and specify `sort="-x"`.
12691269
To finalize this plot we will customize the axis and legend labels using the `title` method,
12701270
and add a title to the chart by specifying the `title` argument of `alt.Chart`.
12711271
Plot titles are not always required, especially when it would be redundant with an already-existing
1272-
caption or surrounding context (e.g., in a slide presentation with annotations).
1272+
caption or surrounding context (e.g., in a slide presentation with annotations).
12731273
But if you decide to include one, a good plot title should provide the take home message
12741274
that you want readers to focus on, e.g., "The Earth's seven largest landmasses are all continents,"
1275-
but it could also more general, e.g., "The twelve largest landmasses on Earth."
1276-
1277-
Note that
1278-
For categorical encodings,
1279-
such as the color and y channels in our chart,
1280-
it is often not necessary to include the axis title
1281-
as the labels of the categories are enough by themselves.
1282-
Particularly in this case where the title clearly states
1283-
that we are landmasses,
1284-
the titles are redundant and we can remove them.
1275+
or a more general summary of the information displayed, e.g., "The twelve largest landmasses on Earth."
12851276

12861277
```{code-cell} ipython3
12871278
islands_plot_sorted = alt.Chart(

0 commit comments

Comments
 (0)