Skip to content

Commit 0cb9d5e

Browse files
committed
DOC all tick labels examples are now sphinx-gallery compatible
1 parent 865996c commit 0cb9d5e

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

examples/ticks_and_spines/tick-formatters.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
"""
2-
Show the different tick formatters
2+
===============
3+
Tick formatters
4+
===============
5+
6+
Show the different tick formatters.
37
"""
48

59
import numpy as np

examples/ticks_and_spines/tick-locators.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
"""
2+
=============
3+
Tick locators
4+
=============
5+
26
Show the different tick locators
37
"""
48

examples/ticks_and_spines/tick_labels_from_values.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
3-
Basic demo showing how to set tick labels to values of a series.
2+
=========================================
3+
Setting tick labels from a list of values
4+
=========================================
45
56
Using ax.set_xticks causes the tick labels to be set on the currently
67
chosen ticks. However, you may want to allow matplotlib to dynamically
@@ -28,6 +29,8 @@ def format_fn(tick_val, tick_pos):
2829
return labels[int(tick_val)]
2930
else:
3031
return ''
32+
33+
3134
ax.xaxis.set_major_formatter(FuncFormatter(format_fn))
3235
ax.xaxis.set_major_locator(MaxNLocator(integer=True))
3336
ax.plot(xs, ys)

examples/ticks_and_spines/ticklabels_demo_rotation.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
"""
2+
===========================
3+
Rotating custom tick labels
4+
===========================
5+
26
Demo of custom tick-labels with user-defined rotation.
37
"""
48
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)